diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-04-16 15:10:21 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-04-16 15:10:21 +0200 |
commit | 0ad302e8cb506234c15f0992329b0ea6d580daf0 (patch) | |
tree | 227e02f8db5d772316ca1a9d5c0eabb5e5f2735b /src/xrep.cpp | |
parent | 48210efd8498cbf666919495ed5873b1355fce62 (diff) |
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 <sustrik@250bpm.com>
Diffstat (limited to 'src/xrep.cpp')
-rw-r--r-- | src/xrep.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
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; } |