Skip to content

Commit 7a474e6

Browse files
committed
Remove CancelConnectAsync - which is .NET 4.0+ only - as dispose of the socket has the same effect.
1 parent 9387469 commit 7a474e6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/Renci.SshNet/Abstractions/SocketAbstraction.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ public static Socket Connect(IPEndPoint remoteEndpoint, TimeSpan connectTimeout)
6666
{
6767
// avoid ObjectDisposedException in ConnectCompleted
6868
args.Completed -= ConnectCompleted;
69-
// avoid leaking threads and /Device/Afd handles
70-
Socket.CancelConnectAsync(args);
7169
// dispose Socket
7270
socket.Dispose();
7371
// dispose ManualResetEvent

0 commit comments

Comments
 (0)