From 5daa0dec0f473c84aab6b12cdc5541335e74f07f Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 11 Sep 2009 13:20:24 +0200 Subject: ZMQII-5: Only one consumer in a process gets the message --- src/zmq_connecter_init.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/zmq_connecter_init.cpp') diff --git a/src/zmq_connecter_init.cpp b/src/zmq_connecter_init.cpp index 4e996d8..730077a 100644 --- a/src/zmq_connecter_init.cpp +++ b/src/zmq_connecter_init.cpp @@ -55,7 +55,9 @@ bool zmq::zmq_connecter_init_t::read (::zmq_msg_t *msg_) // Find the session associated with this connecter. If it doesn't exist // drop the newly created connection. If it does, attach it to the // connection. - session_t *session = owner->find_session (session_name.c_str ()); + session_t *session = NULL; + if (!session_name.empty ()) + session = owner->find_session (session_name.c_str ()); if (!session) { // TODO zmq_assert (false); -- cgit v1.2.3