mirror of
https://github.com/oliverbooth/TcpDotNet
synced 2024-11-23 01:08:47 +00:00
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
Block a user