diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c index 7bdeb5a357f..3bc6fccddf1 100644 --- a/net/tcp/tcp_conn.c +++ b/net/tcp/tcp_conn.c @@ -920,6 +920,10 @@ void tcp_free(FAR struct tcp_conn_s *conn) tcp_stop_timer(conn); + /* Make sure monitor is stopped. */ + + tcp_stop_monitor(conn, TCP_CLOSE); + /* Free remaining callbacks, actually there should be only the send * callback for CONFIG_NET_TCP_WRITE_BUFFERS is left. */