From 1e2564a55feb45f9260812a96f8b18c2cc17dbae Mon Sep 17 00:00:00 2001 From: Martin Hurton Date: Wed, 28 Mar 2012 07:39:18 +0200 Subject: [PATCH] Fix return value of send for router socket --- src/router.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } }