mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
Problem: -1 used for invalid socket
Solution: use retired_fd instead
This commit is contained in:
parent
aa29f7caff
commit
e18772f942
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user