Skip to content

Commit 344e6e5

Browse files
committed
Use a very short timeout when clearing the read buffer.
1 parent 1e802c7 commit 344e6e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Renci.SshNet/Abstractions/SocketAbstraction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static void ClearReadBuffer(Socket socket)
8888

8989
do
9090
{
91-
bytesReceived = ReadPartial(socket, buffer, 0, buffer.Length, TimeSpan.FromSeconds(2));
91+
bytesReceived = ReadPartial(socket, buffer, 0, buffer.Length, TimeSpan.FromMilliseconds(10));
9292
} while (bytesReceived > 0);
9393
}
9494
catch

0 commit comments

Comments
 (0)