This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new ab756e8dd7 net/tcp: Fix keep-alive implementation
ab756e8dd7 is described below
commit ab756e8dd716165b411d14843368325bf7fd581c
Author: Matteo Golin <[email protected]>
AuthorDate: Wed May 28 00:08:35 2025 -0400
net/tcp: Fix keep-alive implementation
The TCP keep-alive implementation would send the probes and abort the
connection correctly, but without waking up the affected socket and
marking the connection as aborted. This patch from zhhyu7 in #16447
resolves the issue.
Signed-off-by: Matteo Golin <[email protected]>
---
net/tcp/tcp_timer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tcp/tcp_timer.c b/net/tcp/tcp_timer.c
index 08fa3fd357..d178e2f51b 100644
--- a/net/tcp/tcp_timer.c
+++ b/net/tcp/tcp_timer.c
@@ -701,6 +701,8 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct
tcp_conn_s *conn)
* connection.
*/
+ devif_conn_event(conn->dev, TCP_ABORT,
+ conn->sconn.list);
tcp_stop_monitor(conn, TCP_ABORT);
}
else