Merge pull request #1564 from c-rack/issue-1558-2

Solution: do not call poller->add_fd() with -1. Fixes #1558
This commit is contained in:
Pieter Hintjens 2015-09-03 12:41:55 +02:00
commit 9e8e81cf9a

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();