Parcourir la source

Use a very short timeout when clearing the read buffer.

drieseng il y a 9 ans
Parent
commit
344e6e52c0
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/Renci.SshNet/Abstractions/SocketAbstraction.cs

+ 1 - 1
src/Renci.SshNet/Abstractions/SocketAbstraction.cs

@@ -88,7 +88,7 @@ namespace Renci.SshNet.Abstractions
 
                 do
                 {
-                    bytesReceived = ReadPartial(socket, buffer, 0, buffer.Length, TimeSpan.FromSeconds(2));
+                    bytesReceived = ReadPartial(socket, buffer, 0, buffer.Length, TimeSpan.FromMilliseconds(10));
                 } while (bytesReceived > 0);
             }
             catch