mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
sockets: remove ERR_CLSD case after data receive
With the changes introduced in b1b62751105d608d57249462d6ac5acbb809dd54 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:
parent
b1b6275110
commit
030ffdee82
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user