Ref:
|
tcs.TrySetException(new TimeoutException($"SendAndWaitAsync timed out after {effectiveTimeout}"))); |
|
return await tcs.Task; |
If the cancellation token passed to SendAndWaitAsync is cancelled externally it always throws a TimeoutException - instead of a OperationCanceledException.
This make it hard to tell to the user what's the real issue - if it's just a user cancellation or if the action indeed timed out.