mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-20 22:31:34 +01: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.
|
||||
int flag = 1;
|
||||
rc = setsockopt (s, SOL_SOCKET, SO_REUSEADDR,
|
||||
rc = setsockopt (s, SOL_SOCKET, SO_EXCLUSIVEADDRUSE,
|
||||
(const char*) &flag, sizeof (int));
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user