]> git.saurik.com Git - redis.git/commitdiff
Fixed another instace of the Issue 173
authorantirez <antirez@gmail.com>
Fri, 27 Aug 2010 10:46:10 +0000 (12:46 +0200)
committerantirez <antirez@gmail.com>
Fri, 27 Aug 2010 10:46:10 +0000 (12:46 +0200)
src/replication.c

index 363ce54ac802db07452987d441dc02248ef8aba8..c28460885ecf46c0fd3b4832adffcae254d57f8c 100644 (file)
@@ -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;