Created
August 11, 2010 11:01
-
-
Save hintjens/518810 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/xrep.cpp b/src/xrep.cpp | |
index 978ed0b..5fd6cbb 100644 | |
--- a/src/xrep.cpp | |
+++ b/src/xrep.cpp | |
@@ -143,8 +143,11 @@ int zmq::xrep_t::xsend (zmq_msg_t *msg_, int flags_) | |
if (!more_out) { | |
zmq_assert (!current_out); | |
- // There's no such thing as prefix with no subsequent message. | |
- zmq_assert (msg_->flags & ZMQ_MSG_MORE); | |
+ // If we have malformed message (prefix with no subsequent message) | |
+ // then just silently drop the message. | |
+ if ((msg_->flags & ZMQ_MSG_MORE) == 0) | |
+ return 0; | |
+ | |
more_out = true; | |
// Find the pipe associated with the identity stored in the prefix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment