sockets: remove ERR_CLSD case after data receive

With the changes introduced in b1b6275110
it's no longer possible to get ERR_CLSD from netconn_recv_tcp_pbuf_flags
after we've received data because of the NETCONN_NOFIN flag, so remove
handling for this case. Further the NETCONN_EVT_RCVPLUS stays active in
netconn_recv_data_tcp when the NETCONN_NOFIN flag is used
This commit is contained in:
Joel Cunningham 2018-02-05 13:50:16 -06:00
parent b1b6275110
commit 030ffdee82

View File

@ -893,14 +893,6 @@ lwip_recv_tcp(struct lwip_sock *sock, void *mem, size_t len, int flags)
if (recvd > 0) {
/* already received data, return that (this trusts in getting the same error from
netconn layer again next time netconn_recv is called) */
if (err == ERR_CLSD) {
/* closed but already received data, ensure select gets the FIN, too */
if (sock->conn->callback != NULL) {
LOCK_TCPIP_CORE();
sock->conn->callback(sock->conn, NETCONN_EVT_RCVPLUS, 0);
UNLOCK_TCPIP_CORE();
}
}
goto lwip_recv_tcp_done;
}
/* We should really do some error checking here. */