From 70cf2d41ba005aa33e732717867320f718c0b456 Mon Sep 17 00:00:00 2001 From: Mikko Koppanen Date: Tue, 10 Apr 2012 09:55:10 +0900 Subject: [PATCH] ETIMEDOUT is a valid error code here. Fixes intermittent assertion failure on laggy networks --- src/stream_engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index ab6329a6..1771990b 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -308,7 +308,8 @@ int zmq::stream_engine_t::write (const void *data_, size_t size_) return 0; // Signalise peer failure. - if (nbytes == -1 && (errno == ECONNRESET || errno == EPIPE)) + if (nbytes == -1 && (errno == ECONNRESET || errno == EPIPE || + errno == ETIMEDOUT)) return -1; errno_assert (nbytes != -1);