mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +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:
parent
3725fe28fb
commit
c1521b2ef2
1 changed files with 2 additions and 1 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue