summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-02-16 10:01:58 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:01:58 +0900
commitbeec98c111ac6a6b9584dd48de6cc68daed1e10e (patch)
tree7eb5014ebc0287378e5695d494d65ae071a905d6 /src
parent486a4471d860bc4e1f733fb7b4dda6e28d1ed8bc (diff)
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 <martin@lucina.net>
Diffstat (limited to 'src')
-rw-r--r--src/pgm_sender.cpp5
1 files changed, 3 insertions, 2 deletions
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 ();
}