mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Merge pull request #2897 from sigiesec/fix-2895
Problem: add_fd might be called with fd_ == retired_fd
This commit is contained in:
commit
c52ca3c284
@ -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::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.
|
// If the file descriptor table is too small expand it.
|
||||||
fd_table_t::size_type sz = fd_table.size ();
|
fd_table_t::size_type sz = fd_table.size ();
|
||||||
if (sz <= (fd_table_t::size_type) fd_) {
|
if (sz <= (fd_table_t::size_type) fd_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user