-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Discard body of body-less methods in background #5331
base: main
Are you sure you want to change the base?
Conversation
Forgot to regenerate files. Doing it now. |
Missing import for sync.WaitGroup. I don't feel like tinkering with the import machinery - and benchmarks don't show any significant slowdown when using channels instead. I'll update the implementation to use plain channels. |
I'll try to write an integration test for this too. |
Apparently, transactional request-response flow is inherent to Go HTTP, including grpc-gateway runtime. @johanbrandhorst |
Sure, it'd be great to know if we break the websocket proxy again in the future, why not! |
I've opened a repository for the websocket proxy itself: It's fairly covered with tests, which fail on |
Please see: #5338 |
When
io.Copy
is called synchronously on HTTP request body, it stalls the clients who keep the request stream open.This broke WebSocket gateway implementations which rely on Close detection to know when to terminate.
This PR runs the
io.Copy
method in the background.References to other Issues or PRs
Fixes #5326.
Have you read the Contributing Guidelines?
Yes.
Brief description of what is fixed or changed
Added
go
keyword in front ofio.Copy
call in the template whenbody
annotation is not set.Other comments