Problem: ypipe_t::read is called with NULL argument

Solution: call check_read instead
This commit is contained in:
Simon Giesecke 2018-05-17 14:25:02 +02:00
parent 440d428153
commit 2120f6aced
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ zmq::mailbox_t::mailbox_t ()
// Get the pipe into passive state. That way, if the users starts by
// polling on the associated file descriptor it will get woken up when
// new command is posted.
const bool ok = cpipe.read (NULL);
const bool ok = cpipe.check_read ();
zmq_assert (!ok);
active = false;
}

View File

@ -37,7 +37,7 @@ zmq::mailbox_safe_t::mailbox_safe_t (mutex_t *sync_) : sync (sync_)
// Get the pipe into passive state. That way, if the users starts by
// polling on the associated file descriptor it will get woken up when
// new command is posted.
const bool ok = cpipe.read (NULL);
const bool ok = cpipe.check_read ();
zmq_assert (!ok);
}