diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp index 48e06f53..0bd03d58 100644 --- a/src/ipc_connecter.cpp +++ b/src/ipc_connecter.cpp @@ -115,7 +115,7 @@ int zmq::ipc_connecter_t::open () // Create the socket. _s = open_socket (AF_UNIX, SOCK_STREAM, 0); - if (_s == -1) + if (_s == retired_fd) return -1; // Set the non-blocking flag. diff --git a/src/tipc_connecter.cpp b/src/tipc_connecter.cpp index f27d4657..6057997f 100644 --- a/src/tipc_connecter.cpp +++ b/src/tipc_connecter.cpp @@ -116,7 +116,7 @@ int zmq::tipc_connecter_t::open () } // Create the socket. _s = open_socket (AF_TIPC, SOCK_STREAM, 0); - if (_s == -1) + if (_s == retired_fd) return -1; // Set the non-blocking flag. diff --git a/src/tipc_listener.cpp b/src/tipc_listener.cpp index a13c16bd..338327bc 100644 --- a/src/tipc_listener.cpp +++ b/src/tipc_listener.cpp @@ -102,7 +102,7 @@ int zmq::tipc_listener_t::set_local_address (const char *addr_) // Create a listening socket. _s = open_socket (AF_TIPC, SOCK_STREAM, 0); - if (_s == -1) + if (_s == retired_fd) return -1; // If random Port Identity, update address object to reflect the assigned address