equal
deleted
inserted
replaced
292 |
292 |
293 // Register an error that happened in the internals somewhere. If |
293 // Register an error that happened in the internals somewhere. If |
294 // there's already an error in the channel, discard the newer one in |
294 // there's already an error in the channel, discard the newer one in |
295 // favor of the older. |
295 // favor of the older. |
296 func (cl *Client) setError(err error) { |
296 func (cl *Client) setError(err error) { |
297 cl.Close() |
297 defer cl.Close() |
298 cl.setStatus(StatusError) |
298 defer cl.setStatus(StatusError) |
|
299 |
299 if len(cl.error) > 0 { |
300 if len(cl.error) > 0 { |
300 return |
301 return |
301 } |
302 } |
302 // If we're in a race between two calls to this function, |
303 // If we're in a race between two calls to this function, |
303 // trying to set the "first" error, just arbitrarily let one |
304 // trying to set the "first" error, just arbitrarily let one |