Skip to content

[dotnet] SendAndWaitAsync throws timeout for cancelled tokens #518

@juscelinotanaka

Description

@juscelinotanaka

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions