Skip to content

Cancel the token when it's created after an Abort/Disconnect #35418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 20, 2021

Conversation

Tratcher
Copy link
Member

@Tratcher Tratcher commented Aug 17, 2021

Fixes #17278 Before this change there were two conditions where an aborted request could return a default CT from RequestAborted:

  1. The client had disconnected during a request body Read before the CT is accessed. This triggers a full request abort, but doesn't create the CT. Trying to access the CT later gets you a default one.
  2. We're unable to register for disconnect notifications. We assume this is because of disconnects, but I haven't found a way to force that failure code path.

rc2 backport candidate.

@Tratcher Tratcher requested a review from JamesNK August 17, 2021 18:49
@Tratcher Tratcher requested a review from halter73 August 20, 2021 17:13
@Tratcher Tratcher merged commit e90a1e7 into dotnet:main Aug 20, 2021
@Tratcher Tratcher deleted the tratcher/httpsys/requestaborted branch August 20, 2021 19:47
@ghost ghost added this to the 7.0-preview1 milestone Aug 20, 2021
@Tratcher
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1151884387

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpSys RequestAborted is not correct if created after the disconnect
4 participants