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:
xueyunfei
2020-01-20 17:14:44 +08:00
committed by David Cermak
parent 83edc19882
commit 66666948f9
+3
View File
@@ -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;