I got exception from the following string is SendkeepAlive (SIP_Flow.cs)
Code:
if (m_pStack.TransportLayer.Stack.Logger != null)
{
m_pStack.TransportLayer.Stack.Logger.AddWrite("", null, 2, "Flow [id='" + this.ID + "'] sent \"ping\"", this.LocalEP, this.RemoteEP);
}
try
{
SendInternal(new byte[]{(byte)'\r',(byte)'\n',(byte)'\r',(byte)'\n'});
}
catch{
// We don't care about errors here.
}
The reason is that this.ID ( or this.LocalEP) throws exception when m_IsDisposed is true.
But no one catches them. So it is thrown to the "Non-handled exceptions" block. So I suggest to change position of "try" block is the following way
Code:
if (m_pStack.TransportLayer.Stack.Logger != null)
{
try
{
m_pStack.TransportLayer.Stack.Logger.AddWrite("", null, 2, "Flow [id='" + this.ID + "'] sent \"ping\"", this.LocalEP, this.RemoteEP);
}
SendInternal(new byte[]{(byte)'\r',(byte)'\n',(byte)'\r',(byte)'\n'});
}
catch{
// We don't care about errors here.
}
Is it OK?