protected void OnTransportInterrupted(ITransport sender)
{
Tracer.Debug("Connection: Transport has been Interrupted.");
this.transportInterruptionProcessingComplete = new CountDownLatch(dispatchers.Count);
if(Tracer.IsDebugEnabled)
{
Tracer.Debug("transport interrupted, dispatchers: " + dispatchers.Count);
}
SignalInterruptionProcessingNeeded();
foreach(Session session in this.sessions)
{
try
{
session.ClearMessagesInProgress();
}
catch(Exception ex)
{
Tracer.Warn("Exception while clearing messages: " + ex.Message);
Tracer.Warn(ex.StackTrace);
}
}
if(this.ConnectionInterruptedListener != null && !this.closing.Value)
{
try
{
this.ConnectionInterruptedListener();
}
catch
{
}
}
}