mirror of
https://github.com/oliverbooth/TcpDotNet
synced 2024-11-09 23:25:42 +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