-
Notifications
You must be signed in to change notification settings - Fork 112
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
Don't send RST_STREAM when not needed #434
Don't send RST_STREAM when not needed #434
Conversation
When the stream state is local_half_closed and an end_stream flag is received, the stream can be terminated normally without RST_STREAM.
Pull Request Test Coverage Report for Build e6a3aac052f01725352df867c357cb80818e034f-PR-434Details
💛 - Coveralls |
This is a WIP, I'm opening for reference. I need to double check some corner cases and maybe my implementation can be simplified. |
# We send a RST_STREAM with the given error code so that we move the | ||
# stream to the :closed state (that is, we remove it). | ||
open?(conn) -> | ||
error_code = if reason == :remote_end_stream, do: :no_error, else: reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this line is ever used, but it doesn't feel right to remove it (?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% happy with the implementation because I think it's a bit dirty, but it solves the problem and is pretty small, so I'm opening the PR.
Also it looks like CI is failing for totally unrelated reasons™️ |
Yes Totally Unrelated™, no worries
@v0idpwn is this ready to review? |
Yes! |
Woot woot! |
When the stream state is local_half_closed and an end_stream flag is received, the stream can be terminated normally without RST_STREAM.
Closes #433.
I still didn't work on integration tests, and while current tests kind of cover this feature, I'll add a specific test for it.