From 029e28865dd47895e6919ce1c3e12c95ea56ad32 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Sun, 25 Dec 2011 02:57:04 +0100 Subject: [PATCH] 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp index 759802f8..1a1ae9a9 100644 --- a/src/pgm_sender.cpp +++ b/src/pgm_sender.cpp @@ -98,8 +98,8 @@ void zmq::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); - zmq_assert (ok); + int rc = session_->write (&msg); + errno_assert (rc == 0); session_->flush (); }