summaryrefslogtreecommitdiff
path: root/src/zmq_listener_init.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-11 13:20:24 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-11 13:20:24 +0200
commit5daa0dec0f473c84aab6b12cdc5541335e74f07f (patch)
treec7a7b5845cd1fa94a25850af1d5d252976c442c5 /src/zmq_listener_init.cpp
parentf824b8a067c60b32260c56020742d6428ed3bb98 (diff)
ZMQII-5: Only one consumer in a process gets the message
Diffstat (limited to 'src/zmq_listener_init.cpp')
-rw-r--r--src/zmq_listener_init.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/zmq_listener_init.cpp b/src/zmq_listener_init.cpp
index 5d2dc2e..98a3780 100644
--- a/src/zmq_listener_init.cpp
+++ b/src/zmq_listener_init.cpp
@@ -70,7 +70,9 @@ void zmq::zmq_listener_init_t::flush ()
// Have a look whether the session already exists. If it does, attach it
// to the engine. If it doesn't create it first.
- session_t *session = owner->find_session (peer_identity.c_str ());
+ session_t *session = NULL;
+ if (!peer_identity.empty ())
+ session = owner->find_session (peer_identity.c_str ());
if (!session) {
io_thread_t *io_thread = choose_io_thread (options.affinity);
session = new session_t (io_thread, owner, peer_identity.c_str (),