diff --git a/examples/usrsocktest/usrsocktest_daemon.c b/examples/usrsocktest/usrsocktest_daemon.c index 849339ab1..9bdd8ccfe 100644 --- a/examples/usrsocktest/usrsocktest_daemon.c +++ b/examples/usrsocktest/usrsocktest_daemon.c @@ -856,7 +856,7 @@ static int recvfrom_request(int fd, FAR struct daemon_priv_s *priv, if (!tsock->connected) { - ret = -ENOTCONN; + ret = (tsock->endp) ? 0 : -ENOTCONN; goto prepare; }