Skip to content
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

Adhere to request.Context when roundtripping on a stream #2796

Merged
merged 3 commits into from
May 17, 2024

Conversation

gammazero
Copy link
Contributor

This allows HTTP request timeout and cancellation to work.

Fixes #2533

This allows HTTP request timeout and cancellation to work.

Fixes #2533
@gammazero gammazero force-pushed the gammazero/adhere-request-context branch from f5dc013 to 1ec7ce7 Compare May 16, 2024 18:52
@gammazero gammazero requested a review from MarcoPolo May 16, 2024 18:52
@MarcoPolo
Copy link
Collaborator

Thanks @gammazero!

I've made a small change to attempt to signal to the lower level that it should cancel the read by setting a read deadline. What do you think?

@gammazero
Copy link
Contributor Author

Yes, to read deadline. The read should be canceled.

p2p/http/libp2phttp.go Outdated Show resolved Hide resolved
@MarcoPolo MarcoPolo merged commit 547f9db into master May 17, 2024
11 checks passed
@gammazero gammazero deleted the gammazero/adhere-request-context branch May 17, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libp2phttp: Adhere to request.Context when roundtripping on a stream
2 participants