perf: remove redundant Task.Run

This commit is contained in:
Oliver Booth 2024-02-12 22:53:54 +00:00
parent a8427fcaf6
commit 55bc903ea9
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 1 additions and 1 deletions

View File

@ -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), cancellationToken); await BaseSocket.ConnectAsync(remoteEP, cancellationToken);
} }
catch catch
{ {