summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Hurton <hurtonm@gmail.com>2010-07-07 17:15:32 +0200
committerMartin Hurton <hurtonm@gmail.com>2010-07-07 17:15:32 +0200
commit1f61c87ac527e2a75cabbce4ea4c5f916f4532e7 (patch)
tree7410922373a11c6e58301b4d66e932bead36214c /src
parentfd707fedc59124ed627780efed081acf33f455d2 (diff)
issue 40 - nbytes != -1 (tcp_socket.cpp:216)
Diffstat (limited to 'src')
-rw-r--r--src/tcp_socket.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp
index cc426d7..a392590 100644
--- a/src/tcp_socket.cpp
+++ b/src/tcp_socket.cpp
@@ -210,7 +210,8 @@ int zmq::tcp_socket_t::read (void *data, int size)
return 0;
// Signalise peer failure.
- if (nbytes == -1 && (errno == ECONNRESET || errno == ECONNREFUSED))
+ if (nbytes == -1 && (errno == ECONNRESET || errno == ECONNREFUSED ||
+ errno == ETIMEDOUT))
return -1;
errno_assert (nbytes != -1);