Skip to content

Commit

Permalink
Update router.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuXxxx committed Mar 11, 2024
1 parent 5db878e commit 93827b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/router.cpp
Expand Up @@ -185,12 +185,13 @@ int zmq::router_t::xsend (msg_t *msg_)
if (!_current_out->check_write ()) {
// Check whether pipe is full or not
const bool pipe_full = !_current_out->check_hwm ();
const bool pipe_active = _current_out->is_active();
out_pipe->active = false;
_current_out = NULL;

if (_mandatory) {
_more_out = false;
if (pipe_full)
if (pipe_full && pipe_active)
errno = EAGAIN;
else
errno = EHOSTUNREACH;
Expand Down

0 comments on commit 93827b0

Please sign in to comment.