diff --git a/src/router.cpp b/src/router.cpp index 4cf5212c..166bac11 100644 --- a/src/router.cpp +++ b/src/router.cpp @@ -164,7 +164,8 @@ int zmq::router_t::xsend (msg_t *msg_, int flags_) errno_assert (rc == 0); } else if(fail_unroutable) { more_out = false; - retval = EHOSTUNREACH; + errno = EHOSTUNREACH; + retval = -1; } }