net: tcp: Set the FIN_TIMEOUT to allow all FIN retries
Instead of using a fixed fin timeout, compute it based on the number of retries. Fixes issue found by PR 44545. Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
This commit is contained in:
parent
768e0d7a01
commit
9392b12d4b
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@ LOG_MODULE_REGISTER(net_tcp, CONFIG_NET_TCP_LOG_LEVEL);
|
|||
|
||||
#define ACK_TIMEOUT_MS CONFIG_NET_TCP_ACK_TIMEOUT
|
||||
#define ACK_TIMEOUT K_MSEC(ACK_TIMEOUT_MS)
|
||||
#define FIN_TIMEOUT_MS MSEC_PER_SEC
|
||||
/* Allow for (tcp_retries + 1) transmissions */
|
||||
#define FIN_TIMEOUT_MS (tcp_rto * (tcp_retries + 1))
|
||||
#define FIN_TIMEOUT K_MSEC(FIN_TIMEOUT_MS)
|
||||
|
||||
static int tcp_rto = CONFIG_NET_TCP_INIT_RETRANSMISSION_TIMEOUT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue