]> git.saurik.com Git - redis.git/blobdiff - src/replication.c
Advertise the existence of redis-check dump --fix when logging an error about corrupt...
[redis.git] / 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;