Skip to content

HTTP/3: Raise RequestAbort on client cancellation #34675

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
Jul 26, 2021

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jul 24, 2021

Fixes #34674

@ghost ghost added the area-runtime label Jul 24, 2021
@JamesNK JamesNK changed the title HTTP/3: Raise RequestAbort on client abort HTTP/3: Raise RequestAbort on client cancellation Jul 24, 2021

var serverWriteTask = await readAsyncTask.Task.DefaultTimeout();

var ex = await Assert.ThrowsAnyAsync<OperationCanceledException>(() => serverWriteTask).DefaultTimeout();
Copy link
Member Author

@JamesNK JamesNK Jul 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the request is aborted and ReadAsync or WriteAsync are called on the server, what should the exception type be? I think HTTP/2 throws IOException...

@JamesNK JamesNK force-pushed the jamesnk/http3-clientabort branch from 3482a8e to 4f6b17e Compare July 26, 2021 21:04
{
// TODO: This is temporary. Don't want to tie HTTP/3 layer to one transport.
// This is here to check what other exceptions can cause ConnectionResetException.
Debug.Assert(ex.InnerException is QuicStreamAbortedException);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really only affects local development, right? I'm not sure this is worth checking in especially if we're not confident in it. Maybe just keep it as a stash you reapply locally? I guess it's not a big deal either way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

I want to check because I'm not confident and I want it to break locally

@JamesNK JamesNK merged commit 8e1c192 into main Jul 26, 2021
@JamesNK JamesNK deleted the jamesnk/http3-clientabort branch July 26, 2021 23:11
@ghost ghost added this to the 6.0-rc1 milestone Jul 26, 2021
@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.

HTTP/3: Request cancellation from client and abort from server
3 participants