mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-12 09:06:26 +00:00
Prevent socket reuse by second bind, on win32
This commit is contained in:
parent
79a3d07c85
commit
0ab6532419
@ -64,7 +64,7 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
|
|||||||
|
|
||||||
// Allow reusing of the address.
|
// Allow reusing of the address.
|
||||||
int flag = 1;
|
int flag = 1;
|
||||||
rc = setsockopt (s, SOL_SOCKET, SO_REUSEADDR,
|
rc = setsockopt (s, SOL_SOCKET, SO_EXCLUSIVEADDRUSE,
|
||||||
(const char*) &flag, sizeof (int));
|
(const char*) &flag, sizeof (int));
|
||||||
wsa_assert (rc != SOCKET_ERROR);
|
wsa_assert (rc != SOCKET_ERROR);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user