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.
Both
BrowserRelay.closeRelay()
andAdvertiserRelay.closeRelay()
don't triggerVirtualSocket.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