Renci.SshNet.ForwardedPort.StopPort C# (CSharp) Method

StopPort() protected method

Stops port forwarding, and waits for the specified timeout until all pending requests are processed.
protected StopPort ( System.TimeSpan timeout ) : void
timeout System.TimeSpan The maximum amount of time to wait for pending requests to finish processing.
return void
        protected virtual void StopPort(TimeSpan timeout)
        {
            RaiseClosing();

            var session = Session;
            if (session != null)
            {
                session.ErrorOccured -= Session_ErrorOccured;
            }
        }