1
0
Fork 0

fixed wrong assertion

This commit is contained in:
jsteemann 2016-06-15 20:34:26 +02:00
parent 2d5816dbb6
commit e7be7730d2
1 changed files with 2 additions and 2 deletions

View File

@ -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;