mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-06-05 21:04:45 +00:00
sockets: Fix free-select-locked after udp close
ESP_LWIP supports closing socket while waiting. This fixes potential
races.
Orig: fix bug for after udp close select_waiting assert (dd3b3017)
Ref IDF-4794
This commit is contained in:
@@ -565,6 +565,9 @@ free_socket_locked(struct lwip_sock *sock, int is_tcp, struct netconn **conn,
|
||||
|
||||
*lastdata = sock->lastdata;
|
||||
sock->lastdata.pbuf = NULL;
|
||||
#if ESP_LWIP
|
||||
sock->select_waiting = 0;
|
||||
#endif /* ESP_LWIP */
|
||||
*conn = sock->conn;
|
||||
sock->conn = NULL;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user