From bde396f1561fb5e57e6e413a40d904586e186d42 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 9 Aug 2009 11:21:47 +0200 Subject: fix to 3-thread synchronisation algorithm --- src/socket_base.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/socket_base.cpp') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 026b317..3141517 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -70,7 +70,11 @@ int zmq::socket_base_t::bind (const char *addr_) { // TODO: The taskset should be taken from socket options. uint64_t taskset = 0; - object_t *listener = new zmq_listener_t (choose_io_thread (taskset), this); + zmq_listener_t *listener = new zmq_listener_t (choose_io_thread (taskset), this); + int rc = listener->set_address (addr_); + if (rc != 0) + return -1; + send_plug (listener); send_own (this, listener); return 0; -- cgit v1.2.3