go-zeromq / zmq4

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

The connReaper goroutine may leak #153

Closed egorse closed 2 months ago

egorse commented 2 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 2 months ago

@sbinet would you mind to tag?

sbinet commented 2 months ago

done.