mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
tcp: add TCP_ACKDATA flag to close event callback
The close package cannot be sent in time without TCP_ACKDATA Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
3725fe28fb
commit
c1521b2ef2
+2
-1
@@ -285,7 +285,8 @@ static inline int tcp_close_disconnect(FAR struct socket *psock)
|
||||
{
|
||||
/* Set up to receive TCP data event callbacks */
|
||||
|
||||
conn->clscb->flags = TCP_NEWDATA | TCP_POLL | TCP_DISCONN_EVENTS;
|
||||
conn->clscb->flags = TCP_NEWDATA | TCP_ACKDATA |
|
||||
TCP_POLL | TCP_DISCONN_EVENTS;
|
||||
conn->clscb->event = tcp_close_eventhandler;
|
||||
conn->clscb->priv = conn; /* reference for event handler to free cb */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user