summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Hintjens <ph@imatix.com>2010-06-29 21:08:41 +0200
committerPieter Hintjens <ph@imatix.com>2010-06-29 21:08:41 +0200
commit0ab65324195ad70205514d465b03d851a6de051c (patch)
tree0f4be460d2755f06b2ce737ac6b205783f074a56 /src
parent79a3d07c8587e840548791efc314b0184c584881 (diff)
Prevent socket reuse by second bind, on win32
Diffstat (limited to 'src')
-rw-r--r--src/tcp_listener.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp
index 0cb9a6e..a62bc04 100644
--- a/src/tcp_listener.cpp
+++ b/src/tcp_listener.cpp
@@ -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);