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

Adjusting TCP connection 3-way handshake state management #367

Merged
merged 6 commits into from
Aug 17, 2020

Conversation

ryan-summers
Copy link
Contributor

This PR fixes #366 by adding an abort() if an ACK is received without the SYN flag set when in SYN-SENT.

The implications of this are that the user will have to re-connect the TCP socket after this occurrence.

@ryan-summers ryan-summers marked this pull request as ready for review August 10, 2020 11:55
@whitequark
Copy link
Contributor

Could you add a test please?

@ryan-summers
Copy link
Contributor Author

Test should now be added

@whitequark whitequark merged commit bdfa442 into smoltcp-rs:master Aug 17, 2020
@ryan-summers ryan-summers deleted the rs/issue-366/tcp-state branch August 17, 2020 08:21
irwineffect added a commit to irwineffect/minimq that referenced this pull request Oct 23, 2020
Previously, the device would not reconnect to MQTT broker after restarting the
program due to smoltcp trying to reuse the previous TCP connection. This was
fixed in smoltcp-rs/smoltcp#367, but this change has
not been released on crates.io yet, so we are pulling in a specific version of
smoltcp until this is released.
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.

TcpSocket::connect does not properly handle an already connected socket
2 participants