Open programatix opened 1 month ago
It seems that the issue is caused by OnOpen()
function in WebRTCWebSocketPeer
class. It's an async
which runs on a thread but doesn't return any Task, so exception raised inside it could not be handled by the original Try..Catch
in WebSocket
open()
, thus making it an unhandled exception.
The easiest way out is to catch the exception in OnOpen()
function for WebRTCWebSocketPeer
class and log the error there. Any suggestion?
Hi,
I'm testing the SIPToWebRTCBridge example project. I have updated it
net8.0
withSIPSorcery
version6.2.4
andSIPSorcery.WebSocketSharp
version0.0.1
.Using webrtcsip.html, if I click Start button and immediately click the Close button to close the websocket, before it complete establishing the connection, I get an unhandled exception.
I tried tracing back the call and it should be initiated from the
open()
function inwebsocket-sharp.dll
which is encapsulated by a try...catch routine, but somehow it crashed the main app.Steps to reproduce: