zeromq / goczmq

goczmq is a golang wrapper for CZMQ.
Mozilla Public License 2.0
591 stars 94 forks source link

Socket not removed from Poller during `Remove()` #300

Open ashmrtn opened 3 years ago

ashmrtn commented 3 years ago

Poller.Remove() doesn't actually remove the given socket from the underlying czmq poller, it just removes it from the slice of golang objects wrapping sockets. While I can't explain the exact reason behind it, this is causing weird behavior when sockets are removed from the poller (at the golang level), the sockets are destroyed, and then new sockets are added to the poller. In these cases the poller never notices new reads pending on the new sockets