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

state machine pic fix to send fin-ack #28

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

Conversation

lol-fi
Copy link
Contributor

@lol-fi lol-fi commented Apr 8, 2019

No description provided.

@sethnielson
Copy link
Contributor

There is a potential problem with this. What about the case where two fins are sent? What about the client and server shutting down at about the same time? Both send fins. Do they both send FIN-ACK's or just ACK's?

@lol-fi
Copy link
Contributor Author

lol-fi commented Apr 10, 2019

Thinking this through, I think it is fine if they both send fin-acks. This is because the protocol specifies that you send the fin ack after you wait for outstanding data and outstanding acks. So one will send the fin-ack, after recving all outstanding data and acks. Now, the receiver will get the fin-ack and shut down and send the last ack.

The other guy will send their fin ack, but it will go to someone who shut down. As specified by the PRFC, they can just shut down, since it is specified that the other guy would not have sent the fin-ack if there was outstanding data, and there wasn't. So, they will time out waiting for their last ack and shut down anyway.

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.

5 participants