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

This commit is contained in:
antirez
2010-09-03 11:45:32 +02:00
parent 29a8c8d20b
commit a3267b8084

View File

@ -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;