Akka.Streams.Implementation.Fusing.GraphInterpreter.Fail C# (CSharp) Method

Fail() private method

private Fail ( int connection, Exception reason ) : void
connection int
reason System.Exception
return void
        internal void Fail(int connection, Exception reason)
        {
            var currentState = PortStates[connection];
            if (IsDebug) Console.WriteLine($"{Name}   Fail({connection}, {reason}) [{currentState}]");
            PortStates[connection] = currentState | OutClosed;
            if ((currentState & (InClosed | OutClosed)) == 0)
            {
                PortStates[connection] = currentState | (OutClosed | InFailed);
                ConnectionSlots[connection] = new Failed(reason, ConnectionSlots[connection]);
                if ((currentState & (Pulling | Pushing)) == 0)
                    Enqueue(connection);
            }

            if ((currentState & OutClosed) == 0)
                CompleteConnection(Assembly.OutletOwners[connection]);
        }