Amqp.Connection.OnIoException C# (CSharp) Method

OnIoException() private method

private OnIoException ( Exception exception ) : void
exception System.Exception
return void
        internal void OnIoException(Exception exception)
        {
            Trace.WriteLine(TraceLevel.Error, "I/O: {0}", exception.ToString());
            if (this.state != State.End)
            {
                this.state = State.End;
                Error error = new Error() { Condition = ErrorCode.ConnectionForced };
                this.OnEnded(error);
            }
        }

Usage Example

Beispiel #1
0
 async Task StartAsync(Connection connection)
 {
     try
     {
         await this.PumpAsync(connection.OnHeader, connection.OnFrame);
     }
     catch (Exception exception)
     {
         connection.OnIoException(exception);
     }
 }
All Usage Examples Of Amqp.Connection::OnIoException