thaliproject / Thali_CordovaPlugin

Thali p2p plugin
MIT License
226 stars 44 forks source link

ThaliCore: closeRelay() doesn't trigger VirtualSocket.closeStream() #1901

Closed enricogior closed 7 years ago

enricogior commented 7 years ago

Both BrowserRelay.closeRelay() and AdvertiserRelay.closeRelay() don't trigger VirtualSocket.closeStream() causing the opened virtualSockets to remain allocated.

The original design of the closeRelay() methods was supposed to trigger a chain of events so that VirtualSocket.closeStream() was later called by BrowserRelay.didDisconnectHandler() and AdvertiserRelay.didDisconnectHandler() but later on this commit changed the original behavior breaking the event chain.

This is one of the bugs that is causing #1891 and is related to https://github.com/thaliproject/Thali_CordovaPlugin/issues/1895

enricogior commented 7 years ago

Fixed in https://github.com/thaliproject/thali-ios/commits/master-enrico-error-handling-tmp