-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
If Disconnect is called without a deadline while a connection is still checked out, we will aggressively close connections, which involves setting the underlying net.Conn to nil. This can cause a race condition if the checked out connection is in the middle of a network read.
We can fix this by adding a atomic int32 status to the connection type to test if a connection is open/closed instead of checking if c.nc == nil.