tobias / vertx-swift-eventbus

Lib for using the Vert.x TCP EventBus bridge from Swift
Apache License 2.0
5 stars 2 forks source link

Disconnect infinite recursion and crash #9

Open nfranke opened 6 years ago

nfranke commented 6 years ago

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.