net/tcp: return true only when send window updates

return true even when window has not changed will cause delayed ack cannot take effect.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2023-06-19 17:15:29 +08:00 committed by archer
parent e93bdfe089
commit 3956a52c58

View File

@ -254,9 +254,11 @@ static bool tcp_snd_wnd_update(FAR struct tcp_conn_s *conn,
conn->snd_wl1 = seq;
conn->snd_wl2 = ackseq;
conn->snd_wnd = wnd;
return true;
if (conn->snd_wnd != wnd)
{
conn->snd_wnd = wnd;
return true;
}
}
return false;