mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
fix close socket block issue
LWIP rx task receives NULL buffer pointer only when closing socket. So, do not need to close it again.
This commit is contained in:
@@ -484,8 +484,6 @@ netconn_recv_data(struct netconn *conn, void **new_buf)
|
|||||||
/* If we are closed, we indicate that we no longer wish to use the socket */
|
/* If we are closed, we indicate that we no longer wish to use the socket */
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);
|
API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);
|
||||||
/* RX side is closed, so deallocate the recvmbox */
|
|
||||||
netconn_close_shutdown(conn, NETCONN_SHUT_RD);
|
|
||||||
/* Don' store ERR_CLSD as conn->err since we are only half-closed */
|
/* Don' store ERR_CLSD as conn->err since we are only half-closed */
|
||||||
return ERR_CLSD;
|
return ERR_CLSD;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user