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

Throw away streams in both directions on RST packet #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeonBuikstraFox
Copy link

No description provided.

@weary
Copy link
Owner

weary commented Feb 16, 2022

This PR breaks the common case for RST packets, where an application closes a socket while data is still pending. For example, a long download where the user clicks cancel. In that case a RST is sent by the client, but as the server was streaming packets some will still be arriving after the RST. With this PR those late packets would open a new stream with a few packets that the client probably has never seen.

@LeonBuikstraFox
Copy link
Author

Good point; that wouldn't happen in our use case, but I can imagine it would have unwanted results in others. What would the expected reassembly behaviour be in that case? Set a timeout instead of closing the streams so the remaining packets are delivered to accept_tcp immediately and the streams are closed a minute later? Could it happen a new connection attempt is made on the same stream key before the timeout expires?

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.

2 participants