Closed dsparkplug closed 6 years ago
Hello and thank you for your contribution!
I've changed your design a bit: now it's storing an initial exception in the InnerException
property.
Also I've added a unit test that will check for the desired behavior.
The SslStream.RemoteCertificate property accessed by SocketStanzaStream.OnConnect can throw exceptions e.g. handshake failed due to unexpected exception.
As ExecuteConnect is run async, this can cause the Jabber client to crash.
I've added a simple try ... catch to handle such errors.