commit | 713a87117602c19f26479c2fb6a2be978e40cb20 | [log] [tgz] |
---|---|---|
author | Vito Caputo <vito.caputo@coreos.com> | Thu Oct 02 00:40:13 2014 |
committer | Vito Caputo <vito.caputo@coreos.com> | Thu Oct 02 00:40:13 2014 |
tree | 48a3e80dc8114f74456668cfe70a6b729686c7fc | |
parent | cfab99a9500db4ba03067996059d2fc425090bf3 [diff] |
Prevent double-close panic in conn.Close inWorker calls Conn.Close() following a read error. The read error may be caused by an external caller calling Conn.Close() in an active close of the established connection. Only one of the callers shall be permitted to perform the actual closing. We're already maintaining a synchronized closed state in Conn.closed, simply short-circuit Conn.Close() when Conn.closed == true.