summaryrefslogtreecommitdiff
path: root/src/socket_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r--src/socket_base.cpp6
1 files changed, 5 insertions, 1 deletions
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;