You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
MCE-KobyBo
changed the title
ACK packets sent twice
ACK packets sometimes sent twice
May 4, 2014
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?
The text was updated successfully, but these errors were encountered: