Problem: -1 used for invalid socket

Solution: use retired_fd instead
This commit is contained in:
Gudmundur Adalsteinsson 2020-04-29 17:12:08 +00:00
parent aa29f7caff
commit e18772f942
3 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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