mirror of https://gitee.com/bigwinds/arangodb
fixed wrong assertion
This commit is contained in:
parent
2d5816dbb6
commit
e7be7730d2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue