perf: remove redundant Task.Run
This commit is contained in:
parent
a8427fcaf6
commit
55bc903ea9
|
@ -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), cancellationToken);
|
||||
await BaseSocket.ConnectAsync(remoteEP, cancellationToken);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue