Commit a3267b80 authored by antirez's avatar antirez
Browse files

Fixed another instace of the Issue 173 (backported from master)

parent 29a8c8d2
...@@ -7806,7 +7806,7 @@ static int syncRead(int fd, char *ptr, ssize_t size, int timeout) { ...@@ -7806,7 +7806,7 @@ static int syncRead(int fd, char *ptr, ssize_t size, int timeout) {
while(size) { while(size) {
if (aeWait(fd,AE_READABLE,1000) & AE_READABLE) { if (aeWait(fd,AE_READABLE,1000) & AE_READABLE) {
nread = read(fd,ptr,size); nread = read(fd,ptr,size);
if (nread == -1) return -1; if (nread <= 0) return -1;
ptr += nread; ptr += nread;
size -= nread; size -= nread;
totread += nread; totread += nread;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment