Problem: add_fd might be called with fd_ == retired_fd

Solution: add assertion
This commit is contained in:
Simon Giesecke 2018-01-25 15:59:57 +01:00
parent 4518e0cc35
commit 7488be61c2

View File

@ -57,6 +57,8 @@ zmq::poll_t::~poll_t ()
zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_)
{
zmq_assert (fd_ != retired_fd);
// If the file descriptor table is too small expand it.
fd_table_t::size_type sz = fd_table.size ();
if (sz <= (fd_table_t::size_type) fd_) {