summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-07-09 09:40:40 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-07-09 09:40:40 +0200
commit52eaf600e5fe2acf5de6208a6a5a123dfcfe1fa2 (patch)
tree35e0f3a47d6fed9d0043a0858ae846e8968a5acd /src
parentaa2150c25c9b0dd518b058f0c50420417441fd23 (diff)
Drop outbound messages in XREP socket when SNDHWM is reached
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src')
-rw-r--r--src/rep.cpp5
-rw-r--r--src/xrep.cpp4
2 files changed, 1 insertions, 8 deletions
diff --git a/src/rep.cpp b/src/rep.cpp
index ee67186..2ad494d 100644
--- a/src/rep.cpp
+++ b/src/rep.cpp
@@ -73,11 +73,8 @@ int zmq::rep_t::xrecv (msg_t *msg_, int flags_)
return rc;
if (!(msg_->flags () & msg_t::label))
break;
-
- // TODO: If the reply cannot be sent to the peer because
- // od congestion, we should drop it.
rc = xrep_t::xsend (msg_, flags_);
- zmq_assert (rc == 0);
+ errno_assert (rc == 0);
}
request_begins = false;
}
diff --git a/src/xrep.cpp b/src/xrep.cpp
index 5d111f8..153be46 100644
--- a/src/xrep.cpp
+++ b/src/xrep.cpp
@@ -145,10 +145,6 @@ int zmq::xrep_t::xsend (msg_t *msg_, int flags_)
it->second.active = false;
more_out = false;
current_out = NULL;
- rc = empty.close ();
- errno_assert (rc == 0);
- errno = EAGAIN;
- return -1;
}
rc = empty.close ();
errno_assert (rc == 0);