mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-31 01:43:02 +08:00
Problem: IPC event_closed logs -1 as the FD
Solution: take a copy of the file descriptor before setting it to retired_fd.
This commit is contained in:
parent
9be8cebd21
commit
7ad06f1449
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user