]> granicus.if.org Git - esp-idf/commitdiff
fix close socket block issue
authorXiaXiaotian <xiaxiaotian@espressif.com>
Tue, 23 May 2017 13:08:03 +0000 (21:08 +0800)
committerXiaXiaotian <xiaxiaotian@espressif.com>
Tue, 23 May 2017 13:08:03 +0000 (21:08 +0800)
    LWIP rx task receives NULL buffer pointer only when closing socket.
    So, do not need to close it again.

components/lwip/api/api_lib.c

index e5c247f0bc840b38c5232d5e66343c48d499e437..676e43388c5212d5d075b850b7b3fd86a2021735 100755 (executable)
@@ -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 (buf == NULL) {
       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 */
       return ERR_CLSD;
     }