Commit 7ad06f14 authored by Luca Boccassi's avatar Luca Boccassi

Problem: IPC event_closed logs -1 as the FD

Solution: take a copy of the file descriptor before setting it to
retired_fd.
parent 9be8cebd
......@@ -289,6 +289,7 @@ error:
int zmq::ipc_listener_t::close ()
{
zmq_assert (s != retired_fd);
int fd_for_event = s;
int rc = ::close (s);
errno_assert (rc == 0);
......@@ -308,7 +309,7 @@ int zmq::ipc_listener_t::close ()
}
}
socket->event_closed (endpoint, s);
socket->event_closed (endpoint, fd_for_event);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment