A portion of code is dependent on the following logic in ConnectionStatusUpdate event handler. I am making use of
e.Error.IsGood() to check the status code. But strangely in the event of network disconnection, .IsGood() on the Error object which is an instance of StatusCode class return true, though expected is a false. Below is the portion of event handler logic.
Code: Select all
internal void OnConnectionStatusUpdate(Session sender, ServerConnectionStatusUpdateEventArgs e)
{
if(e.Error.IsGood())
{
//Assumes connection is good.
}
else
{
//Assumes connection is not right. Updates connection status.
}
}