mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-06 21:56:25 +01:00
Be more conservative about when to generate ZMQ_EVENT_CLOSE_FAILED
This also fixes a bug in tcp_connecter and tcp_listener, which generated the event not when they failed to close the socket but when the succeed to close it.
This commit is contained in:
@@ -169,10 +169,7 @@ int zmq::ipc_listener_t::close ()
|
||||
{
|
||||
zmq_assert (s != retired_fd);
|
||||
int rc = ::close (s);
|
||||
if (rc != 0) {
|
||||
socket->monitor_event (ZMQ_EVENT_CLOSE_FAILED, endpoint.c_str(), zmq_errno());
|
||||
return -1;
|
||||
}
|
||||
errno_assert (rc == 0);
|
||||
|
||||
// If there's an underlying UNIX domain socket, get rid of the file it
|
||||
// is associated with.
|
||||
|
||||
Reference in New Issue
Block a user