summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2010-09-03 11:45:32 +0200
committerantirez <antirez@gmail.com>2010-09-03 11:45:32 +0200
commita3267b8084bf64eb8ed29e7627aa5ba31670e82b (patch)
treeb30f84966ea50054377b9516dbb82022959cd3ad
parent29a8c8d20b13d297cfd4a1f473727d15e9c3b2dc (diff)
downloadredis-a3267b8084bf64eb8ed29e7627aa5ba31670e82b.tar.gz
Fixed another instace of the Issue 173 (backported from master)
-rw-r--r--redis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/redis.c b/redis.c
index e260082e6..2e6bec521 100644
--- a/redis.c
+++ b/redis.c
@@ -7806,7 +7806,7 @@ static 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;