1
0
mirror of https://github.com/oliverbooth/TcpDotNet synced 2024-11-09 23:05:41 +00:00

feat: pass cancellation token to ConnectAsync

This commit is contained in:
Oliver Booth 2024-02-12 19:26:49 +00:00
parent 362c51cd09
commit bb734eac96
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5

View File

@ -82,7 +82,7 @@ public sealed class ProtocolClient : ClientNode
BaseSocket = new Socket(remoteEP.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
try
{
await Task.Run(() => BaseSocket.ConnectAsync(remoteEP), cancellationToken);
await Task.Run(() => BaseSocket.ConnectAsync(remoteEP, cancellationToken), cancellationToken);
}
catch
{