mirror of
https://github.com/oliverbooth/TcpDotNet
synced 2024-11-23 00:28:48 +00:00
refactor: pass cancellation token to SetCanceled
This commit is contained in:
parent
19c83b14a1
commit
3ac93daf4f
@ -295,11 +295,11 @@ public abstract class ClientNode : Node
|
||||
}
|
||||
catch (TaskCanceledException)
|
||||
{
|
||||
completionSource.SetCanceled();
|
||||
completionSource.SetCanceled(cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
completionSource.SetCanceled();
|
||||
completionSource.SetCanceled(cancellationToken);
|
||||
}, cancellationToken);
|
||||
|
||||
var packet = (TPacket)await Task.Run(() => completionSource.Task, cancellationToken);
|
||||
|
Loading…
Reference in New Issue
Block a user