Get warning logic right on wakeup socket.

This commit is contained in:
Michael Meeks 2017-03-18 14:44:07 +00:00
parent b8b5cc2069
commit 0d8809f0ca

View file

@ -374,7 +374,7 @@ public:
rc = ::write(fd, "w", 1);
} while (rc == -1 && errno == EINTR);
if (rc != -1 || errno == EAGAIN || errno == EWOULDBLOCK)
if (rc == -1 && errno != EAGAIN && errno != EWOULDBLOCK)
LOG_WRN("wakeup socket #" << fd << " is closd at wakeup? error: " << errno);
}