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

Detecting closed stream #61

Open
crackcomm opened this issue Jun 13, 2024 · 2 comments
Open

Detecting closed stream #61

crackcomm opened this issue Jun 13, 2024 · 2 comments

Comments

@crackcomm
Copy link

Currently the server keeps writing even after the client closes the connection.

I'm not sure if it's even possible to detect it.

@wokalski
Copy link
Contributor

wokalski commented Jun 13, 2024

Cześć Łukasz, yes it is possible to detect it. I will test if the current rewrite in grpc-eio-noseq already handles that case.

One adjacent aspect of this, however, is handling of GOAWAY frames.
anmonteiro/ocaml-h2#240
anmonteiro/ocaml-h2#241

This will further improve the ergonomics and bring this library closer to feature parity with Google's libs (ironically the best implementation of this behavior can be found in a GitHub issue grpc/grpc-go#6019 this is not the issue, I cannot find it but tldr; streams are closed on the second go away, the first one is to begin graceful shutdown procedure)

@crackcomm
Copy link
Author

Do you know how we can detect this? I tried calling Body.Writer.is_closed on a writer returned by respond_with_streaming, but it was never actually true until Body.Writer.close was called by returning from the handler.

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

No branches or pull requests

2 participants