Problem: do not call poller->add_fd() with -1. Fixes #1558

This commit is contained in:
Constantin Rack 2015-09-03 12:31:55 +02:00
parent 23c55612e4
commit 5dad00ebdc

View File

@ -40,8 +40,10 @@ zmq::reaper_t::reaper_t (class ctx_t *ctx_, uint32_t tid_) :
poller = new (std::nothrow) poller_t (*ctx_);
alloc_assert (poller);
mailbox_handle = poller->add_fd (mailbox.get_fd (), this);
poller->set_pollin (mailbox_handle);
if (mailbox.get_fd () != retired_fd) {
mailbox_handle = poller->add_fd (mailbox.get_fd (), this);
poller->set_pollin (mailbox_handle);
}
#ifdef HAVE_FORK
pid = getpid();