From 0ad302e8cb506234c15f0992329b0ea6d580daf0 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 16 Apr 2012 15:10:21 +0200 Subject: Few trivial fixes to REQ/REP pattern. - couple of comments adjusted - empty 'stack delimiter' message correctly closed - non-reachable function xrep_t::rollback() removed Signed-off-by: Martin Sustrik --- src/xrep.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/xrep.cpp') diff --git a/src/xrep.cpp b/src/xrep.cpp index f0f2cde..007ed27 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -267,16 +267,6 @@ int xs::xrep_t::xrecv (msg_t *msg_, int flags_) return 0; } -int xs::xrep_t::rollback (void) -{ - if (current_out) { - current_out->rollback (); - current_out = NULL; - more_out = false; - } - return 0; -} - bool xs::xrep_t::xhas_in () { // If we are in the middle of reading the messages, there are @@ -310,9 +300,10 @@ bool xs::xrep_t::xhas_in () bool xs::xrep_t::xhas_out () { - // In theory, XREP socket is always ready for writing. Whether actual - // attempt to write succeeds depends on whitch pipe the message is going - // to be routed to. + // XREP socket is always ready for writing. Whether actual + // attempt to send will succeed depends on whether the pipe the message + // is routed to is available for writing. If it's not, message will be + // dropped. return true; } -- cgit v1.2.3