Multiple calls to bind will cause resource leak
Alexei-Kornienko opened this issue · comments
User may call socket.bind("...")
multiple times. Overall socket should work properly (accepting connections from several endpoints) However only last stop_handle will be used to stop accepting new connections. Handles from previous call will be lost and cause possible issues/resource leak
IMHO we should either prevent user from calling bind multiple times or make sure that we save all stop handles in some vec
The ZMQ C api lets users bind multiple times. Also, its probably important to allow users to bind somewhere and then bind again at a later point in time. Therefore saving the stop handles is probably the right move