From 09252fc4f36e9a5b89c9a9ff8b3c9750a3144b45 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 27 Aug 2010 12:46:10 +0200 Subject: [PATCH] Fixed another instace of the Issue 173 --- src/replication.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/replication.c b/src/replication.c index 363ce54a..c2846088 100644 --- a/src/replication.c +++ b/src/replication.c @@ -138,7 +138,7 @@ int syncRead(int fd, char *ptr, ssize_t size, int timeout) { while(size) { if (aeWait(fd,AE_READABLE,1000) & AE_READABLE) { nread = read(fd,ptr,size); - if (nread == -1) return -1; + if (nread <= 0) return -1; ptr += nread; size -= nread; totread += nread; -- 2.45.2