Browse Source

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

drieseng 9 years ago
parent
commit
f80b14dc50
1 changed files with 1 additions and 1 deletions
  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,