Microsoft.AspNet.SignalR.Client.Transports.LongPollingTransport.OnError C# (CSharp) Method

OnError() private method

private OnError ( IConnection connection, Exception exception ) : void
connection IConnection
exception System.Exception
return void
        internal virtual void OnError(IConnection connection, Exception exception)
        {
            TransportFailed(exception);
            _reconnectInvoker.Invoke();

            if (!TransportHelper.VerifyLastActive(connection))
            {
                StopPolling();
            }

            // Transition into reconnecting state
            connection.EnsureReconnecting();

            // Sometimes a connection might have been closed by the server before we get to write anything
            // so just try again and raise OnError.
            if (!ExceptionHelper.IsRequestAborted(exception) && !(exception is IOException))
            {
                connection.OnError(exception);
            }
        }