I'm calling ShellStream.Readline in my code after sending a command, but if I then loop and call ReadLine, I find that the _socket.Receive call in Session.NET.cs returns zero bytes read and hence throws the shConnectionException exception.
I'm trying to figure out why this is happening but so far no luck. It seems this should not happen because ReadLine only reads from the _incoming buffer, which in turn only gets filled when a ChannelDataMessage is received. This is at a higher level than the socket itself so it is unclear to me why the socket's data gets stolen by the ReadLine call.
Any ideas?
I'm trying to figure out why this is happening but so far no luck. It seems this should not happen because ReadLine only reads from the _incoming buffer, which in turn only gets filled when a ChannelDataMessage is received. This is at a higher level than the socket itself so it is unclear to me why the socket's data gets stolen by the ReadLine call.
Any ideas?