diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/message_pump_libevent.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/base/message_pump_libevent.cc b/base/message_pump_libevent.cc index 0b849c5..2f828ba 100644 --- a/base/message_pump_libevent.cc +++ b/base/message_pump_libevent.cc @@ -65,7 +65,7 @@ void MessagePumpLibevent::OnWakeup(int socket, short flags, void* context) { // Remove and discard the wakeup byte. char buf; int nread = read(socket, &buf, 1); - DCHECK(nread == 1); + DCHECK_EQ(nread, 1); // Tell libevent to break out of inner loop. event_base_loopbreak(that->event_base_); } @@ -250,7 +250,8 @@ void MessagePumpLibevent::ScheduleWork() { // Tell libevent (in a threadsafe way) that it should break out of its loop. char buf = 0; int nwrite = write(wakeup_pipe_in_, &buf, 1); - DCHECK(nwrite == 1); + DCHECK(nwrite == 1 || errno == EAGAIN) + << "[nwrite:" << nwrite << "] [errno:" << errno << "]"; } void MessagePumpLibevent::ScheduleDelayedWork(const Time& delayed_work_time) { |