xer_mamin has uploaded a patch.
Description:
deadlock in Session: if an exception occurs in the function {Session.cs/private void MessageListener()}, then in the function of {Session.cs/private void Disconnect(DisconnectReason reason, string message)} happens expectation function setting event, which is set lower in the call stack (as a function of {Session.cs/public void Connect()}) =>
Session.cs/public void Connect()
{
....
#line 583
ExecuteThread(() =>
{
try
{
MessageListener();
}
finally
{
//---!!!--- _messageListenerCompleted.Set();
//---!!!---д.б. так---!!!---//
if ( _messageListenerCompleted != null )
{
_messageListenerCompleted.Set();
}
}
});
}