Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Created Issue: Forwarded Port channels can get stuck waiting [1558]

$
0
0
I was testing ssh.net with 2 ForwardedPortLocals. When a connection is established, a port is forwarded properly but the channel is sometimes not closed, depending on how the local port was closed.

It can get stuck waiting for an EOF that never comes in ChannelDirectTcpip.cs Bind()
System.Threading.WaitHandle.WaitAny(new WaitHandle[] { this._channelEof });

this is because the while loop above can exit gracefully if _socket.CanRead() returns false. In this scenario no CloseMessage was ever sent so it will sit waiting forever. I suggest adding:

this.SendMessage( new ChannelCloseMessage( this.RemoteChannelNumber ) );

after the while loop or moving the WaitAny line into Close();

Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>