diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-02-12 15:58:22 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-02-12 15:58:22 +0100 |
commit | 96e0442332fcc680ddafdcaa8fcbdc6acd992c76 (patch) | |
tree | ccec5f30e5dfe752910fa75d5e43a6851ecaccc7 /src | |
parent | 36a576370ccfed3c104850b5b95a6ed3870edbea (diff) | |
parent | dc8f4b1b761103784b422b7604bc8f36d429d3f4 (diff) |
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'src')
-rw-r--r-- | src/socket_base.cpp | 4 | ||||
-rw-r--r-- | src/zmq_listener.hpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp index f5ba441..720e8cd 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -100,8 +100,10 @@ int zmq::socket_base_t::bind (const char *addr_) choose_io_thread (options.affinity), this, options); zmq_assert (listener); int rc = listener->set_address (addr_type.c_str(), addr_args.c_str ()); - if (rc != 0) + if (rc != 0) { + delete listener; return -1; + } send_plug (listener); send_own (this, listener); diff --git a/src/zmq_listener.hpp b/src/zmq_listener.hpp index c82a280..c990b02 100644 --- a/src/zmq_listener.hpp +++ b/src/zmq_listener.hpp @@ -35,14 +35,13 @@ namespace zmq zmq_listener_t (class io_thread_t *parent_, socket_base_t *owner_, const options_t &options_); + ~zmq_listener_t (); // Set address to listen on. int set_address (const char* protocol_, const char *addr_); private: - ~zmq_listener_t (); - // Handlers for incoming commands. void process_plug (); void process_unplug (); |