提交 09252fc4 编写于 作者: A antirez

Fixed another instace of the Issue 173

上级 357d3673
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册