Added comment for reset of waithandle.

This commit is contained in:
drieseng
2016-04-05 17:51:43 +02:00
parent b1b2186cdb
commit 430bf0ebf6
+2
View File
@@ -64,6 +64,8 @@ namespace Renci.SshNet
// actually received
lock (_socketReadLock)
{
// reset waithandle, as we're only interested in reads that take
// place between Poll and the Available check
_bytesReadFromSocket.Reset();
var connectionClosedOrDataAvailable = _socket.Poll(1000, SelectMode.SelectRead);
isConnected = !(connectionClosedOrDataAvailable && _socket.Available == 0);