go-zeromq / zmq4

[WIP] Pure-Go implementation of ZeroMQ-4
BSD 3-Clause "New" or "Revised" License
344 stars 57 forks source link

The connReaper goroutine may leak #153

Closed egorse closed 6 months ago

egorse commented 6 months ago

It seems the socket.Close() only does sck.reaperCond.Signal() to close connReaper goroutine. But the signal seems can be delivered only if the connReaper is in sck.reaperCond.Wait().

That cause at least short leaving sockets (.Dial() and .Close()) sometimes to leak.

egorse commented 6 months ago

@sbinet would you mind to tag?

sbinet commented 6 months ago

done.