summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikko Koppanen <mikko@kuut.io>2012-04-10 09:55:10 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-04-11 06:03:55 +0200
commitc29605678490614d90c3850438e13c36abc6d12f (patch)
treeb1dd5de127201b01349c418e53e0768be222d23e
parentc55b285b7d44c796adce0818ac0d043d16090a33 (diff)
ETIMEDOUT is a valid error code here. Fixes intermittent assertion failure on laggy networks
-rw-r--r--src/stream_engine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp
index d9125d0..ed03f59 100644
--- a/src/stream_engine.cpp
+++ b/src/stream_engine.cpp
@@ -315,7 +315,8 @@ int xs::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);