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

Do not send window updates in states that shouldn't do so. #360

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Jun 25, 2020

This fixes #358, but not only. I've noticed that window updates are also sent in CloseWait and Closed states, which is actually incorrect.

This PR adds two previously-failing tests.

Previously, the window update was sent anytime it changed. This is
not desirable for 2 reasons:

  • It would send window updates in TimeWait or Closed states, which is incorrect.
  • It would send window updates in states where we've already received the
    remote side's FIN, such as CloseWait. This is not necessarily incorrect, but
    is useless, since the remote side is not going to send us more data, therefore
    it's not interested in our window size anymore.

Previously, the window update was sent anytime it changed. This is
not desirable for 2 reasons:

- It would send window updates in TimeWait or Closed states, which is incorrect.
- It would send window updates in states where we've already received the
  remote side's FIN, such as CloseWait. This is not necessarily incorrect, but
  is useless, since the remote side is not going to send us more data, therefore
  it's not interested in our window size anymore.
@whitequark
Copy link
Contributor

Thank you!

@whitequark whitequark merged commit be6bbfe into smoltcp-rs:master Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Don't send window updates if remote side has closed the connection?
2 participants