Descriptionserver.go: handle a race between Close and Connect
If one routine (such as the pinger) starts a new connection at the same time a Close is called (say by test case tear down), it is possible for that connection to return and be marked alive even though all other connections are closed.
This checks if closed has happened since the connect was requested, and immediately closes the new connection.
See bug #1191487 for more details about how this was triggered in the juju-core test suite.
https://code.launchpad.net/~jameinel/mgo/bug-1191487-close-race/+merge/169999
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 10
Patch Set 2 : server.go: handle a race between Close and Connect #Patch Set 3 : server.go: handle a race between Close and Connect #MessagesTotal messages: 7
|