Skip to content

Commit 4e3060a

Browse files
jukkarnashif
authored andcommitted
net: tcp2: Retrigger resend if sending window is full
If we try to send data but the sending window is full, then try to kick the resend of the pending data. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 6945950 commit 4e3060a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

subsys/net/ip/tcp2.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,13 @@ int net_tcp_queue_data(struct net_context *context, struct net_pkt *pkt)
14341434
k_mutex_lock(&conn->lock, K_FOREVER);
14351435

14361436
if (tcp_window_full(conn)) {
1437+
/* Trigger resend if the timer is not active */
1438+
if (!k_delayed_work_remaining_get(&conn->send_data_timer)) {
1439+
NET_DBG("Window full, trigger resend");
1440+
tcp_resend_data(
1441+
(struct k_work *)&conn->send_data_timer);
1442+
}
1443+
14371444
ret = -EAGAIN;
14381445
goto out;
14391446
}

0 commit comments

Comments
 (0)