If the remote side closes the TCP connection (e.g. server is shut down), this library will try to infinitely recurse sending the unregister message. That fails, so it calls disconnect() again, which tries to unregister, which fails and calls disconnect() again, etc.
disconnect() should likely set a variable that it's disconnecting and if set, just return.
If the remote side closes the TCP connection (e.g. server is shut down), this library will try to infinitely recurse sending the unregister message. That fails, so it calls disconnect() again, which tries to unregister, which fails and calls disconnect() again, etc.
disconnect() should likely set a variable that it's disconnecting and if set, just return.