Explorar el Código

Inversed logic, as ConnectAsync returns true when there's I/O pending.

drieseng hace 9 años
padre
commit
f80b14dc50
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Renci.SshNet/Abstractions/SocketAbstraction.cs

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

@@ -48,7 +48,7 @@ namespace Renci.SshNet.Abstractions
             };
             args.Completed += ConnectCompleted;
 
-            if (!socket.ConnectAsync(args))
+            if (socket.ConnectAsync(args))
             {
                 if (!connectCompleted.WaitOne(connectTimeout))
                     throw new SshOperationTimeoutException(string.Format(CultureInfo.InvariantCulture,