[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] close listening socket with linger enabled
From: |
代尔欣 |
Subject: |
[lwip-devel] close listening socket with linger enabled |
Date: |
Sun, 4 Feb 2024 11:35:18 +0800 (CST) |
Hi lwip dev, I met an assert issues when close listening socket with linger enabled.
in lwip_netconn_do_close_internal()
{
...
if(shut_close){
tcp_arg(tpcb, NULL); //pcb->callback_arg is NULL
}
if(shut_close){
#if LWIP_SO_LINGER
...
tcp_abort();//assert happened in this call
...
#endif
}
...
}
api_msg.c::err_tcp() will be called in following process tcp_abort()==>tcp_abandon==>TCP_EVENT_ERR==>err_tcp
because err_tcp will assert if first input para is NULL which is pcb->callback_arg. it already be cleared.
It seems tcp_arg(tpcb, NULL); called too early if need call user callback to notify err event?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] close listening socket with linger enabled,
代尔欣 <=