Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

ECANCELED operation canceled, received after request completed #1254

Closed
@mateanticevic

Description

@mateanticevic

I was trying to test the cancellation token functionality.

        public async Task<string> Get(CancellationToken ct = default(CancellationToken))
        {
            await Task.Delay(5000);

            return "ok";
        }

Scenario:

  • Send HTTP GET request
  • Abort
  • Inspect CancellationToken at "return ok" break point

Result:

  • IsCancellationRequested = false
  • CanBeCanceled = true

Console lists the abort event last, after the HTTP request has finished.

Tried to run the same scenario using WebListener and the IsCancellationRequested was true, as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions