Revert "net/tcp: return ENOTCONN if the connect migrate to the closed state"

This reverts commit 3d0775e79a.
This commit is contained in:
chao.an
2021-03-08 11:53:30 +08:00
parent 7a44b007c7
commit c52fc22af1
+1 -1
View File
@@ -728,7 +728,7 @@ ssize_t psock_tcp_recvfrom(FAR struct socket *psock, FAR void *buf,
* recvfrom() will get an end-of-file indication.
*/
if (ret <= 0 || _SS_ISCLOSED(psock->s_flags))
if (ret <= 0 && !_SS_ISCLOSED(psock->s_flags))
{
/* Nothing was previously received from the read-ahead buffers.
* The SOCK_STREAM must be (re-)connected in order to receive any