Skip to content

[dotnet] SendAndWaitAsync throws timeout for cancelled tokens #518

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions