From beec98c111ac6a6b9584dd48de6cc68daed1e10e Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Thu, 16 Feb 2012 10:01:58 +0900 Subject: Fix assertion in pgm_sender_t::plug() (LIBZMQ-303) Opening any PGM socket gives this assertion. The problem is in pgm_sender_t::plug() which is incorrectly testing the return value from session::write(). Signed-off-by: Martin Lucina --- src/pgm_sender.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp index 707ced0..1bfd944 100644 --- a/src/pgm_sender.cpp +++ b/src/pgm_sender.cpp @@ -1,6 +1,7 @@ /* Copyright (c) 2009-2012 250bpm s.r.o. Copyright (c) 2007-2009 iMatix Corporation + Copyright (c) 2012 Lucina & Associates Copyright (c) 2010-2011 Miru Limited Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file @@ -98,8 +99,8 @@ void xs::pgm_sender_t::plug (io_thread_t *io_thread_, session_base_t *session_) msg_t msg; msg.init_size (1); *(unsigned char*) msg.data () = 1; - bool ok = session_->write (&msg); - xs_assert (ok); + int rc = session_->write (&msg); + errno_assert (rc == 0); session_->flush (); } -- cgit v1.2.3