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

ACK packets sometimes sent twice #19

Open
MCE-KobyBo opened this issue May 4, 2014 · 1 comment
Open

ACK packets sometimes sent twice #19

MCE-KobyBo opened this issue May 4, 2014 · 1 comment

Comments

@MCE-KobyBo
Copy link

While testing, I've noticed that sometimes ACK packets were sent twice in a row. After going through the code, I think I've found the reason:
In device_tcp_input, when data is received from the device on a TCP connection, an ACK is sent (a call to send_tcp_ack was added in a recent commit). But, since the connection's tx_ack is only increased in device_client_process (after the data is actually sent to the client), the ACK doesn't ACK the data received. So in my case, another ACK was sent in the next iteration because of a timeout (after the data was sent to the client).
I think it would be better to send the ACK after increasing tx_ack, either in device_tcp_input or in device_client_process. What do you think?

@MCE-KobyBo MCE-KobyBo changed the title ACK packets sent twice ACK packets sometimes sent twice May 4, 2014
@FunkyM FunkyM added bug and removed enhancement labels Oct 30, 2014
@FunkyM
Copy link
Member

FunkyM commented Oct 30, 2014

Thanks, confirming this is a bug. I think it would be good to not sent duplicate or obsolete ACKs at all and fix up the I/O to properly ACK packets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants