From e7be7730d264fac5588e2623fe79d4e918fe958c Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 15 Jun 2016 20:34:26 +0200 Subject: [PATCH] fixed wrong assertion --- arangod/Scheduler/SocketTask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arangod/Scheduler/SocketTask.cpp b/arangod/Scheduler/SocketTask.cpp index 11fe13da56..76ac11e600 100644 --- a/arangod/Scheduler/SocketTask.cpp +++ b/arangod/Scheduler/SocketTask.cpp @@ -126,7 +126,7 @@ bool SocketTask::fillReadBuffer() { // if (myerrno != EWOULDBLOCK && myerrno != EAGAIN) // having two identical branches (because EWOULDBLOCK == EAGAIN on Linux). // however, posix states that there may be systems where EWOULDBLOCK != EAGAIN... - if (myerrno != EWOULDBLOCK && (EWOULDBLOCK != EAGAIN && myerrno != EAGAIN)) { + if (myerrno != EWOULDBLOCK && (EWOULDBLOCK == EAGAIN || myerrno != EAGAIN)) { LOG(DEBUG) << "read from socket failed with " << myerrno << ": " << strerror(myerrno); return false; @@ -172,7 +172,7 @@ bool SocketTask::handleWrite() { return handleWrite(); } - if (myerrno != EWOULDBLOCK && (EAGAIN != EWOULDBLOCK && myerrno != EAGAIN)) { + if (myerrno != EWOULDBLOCK && (EAGAIN == EWOULDBLOCK || myerrno != EAGAIN)) { LOG(DEBUG) << "writing to socket failed with " << myerrno << ": " << strerror(myerrno); return false;