diff --git a/libs/exasock/socket/recv.c b/libs/exasock/socket/recv.c index 568d389..3ccf395 100644 --- a/libs/exasock/socket/recv.c +++ b/libs/exasock/socket/recv.c @@ -1070,10 +1070,8 @@ recvmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen, flags & ~MSG_WAITFORONE); if (ret == -1) { - /* no more data, and user wants non-blocking behaviour */ - if (errno == EAGAIN - && (flags & MSG_WAITFORONE) - && (i > 0)) + /* subsequent calls will return the error */ + if (i > 0) ret = i; goto out; }