mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-17 20:24:24 +00:00
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:
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…
Reference in New Issue
Block a user