Renci.SshNet.SshClient.OnDisconnecting C# (CSharp) Method

OnDisconnecting() protected method

Called when client is disconnecting from the server.
protected OnDisconnecting ( ) : void
return void
        protected override void OnDisconnecting()
        {
            base.OnDisconnecting();

            foreach (var port in _forwardedPorts)
            {
                port.Stop();
            }
        }