mirror of
https://github.com/oliverbooth/TcpDotNet
synced 2024-11-10 03:35:43 +00:00
feat: pass cancellation token to ConnectAsync
This commit is contained in:
parent
362c51cd09
commit
bb734eac96
@ -82,7 +82,7 @@ public sealed class ProtocolClient : ClientNode
|
|||||||
BaseSocket = new Socket(remoteEP.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
BaseSocket = new Socket(remoteEP.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await Task.Run(() => BaseSocket.ConnectAsync(remoteEP), cancellationToken);
|
await Task.Run(() => BaseSocket.ConnectAsync(remoteEP, cancellationToken), cancellationToken);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user