public void ClosingLoop()
{
try
{
m_frameHandler.Timeout = 0;
// Wait for response/socket closure or timeout
while (!m_closed)
{
MainLoopIteration();
}
}
catch (ObjectDisposedException ode)
{
if (!m_closed)
LogCloseError("Connection didn't close cleanly", ode);
}
catch (EndOfStreamException eose)
{
if (m_model0.CloseReason == null)
LogCloseError("Connection didn't close cleanly. "
+ "Socket closed unexpectedly", eose);
}
catch (IOException ioe)
{
LogCloseError("Connection didn't close cleanly. "
+ "Socket closed unexpectedly", ioe);
}
catch (Exception e)
{
LogCloseError("Unexpected exception while closing: ", e);
}
}