提交 dbfdd991 编写于 作者: A antirez

Diskless replication: swap inverted branches to compute read len.

上级 d1b54c46
......@@ -881,10 +881,10 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) {
/* Read bulk data */
if (usemark) {
readlen = sizeof(buf);
} else {
left = server.repl_transfer_size - server.repl_transfer_read;
readlen = (left < (signed)sizeof(buf)) ? left : (signed)sizeof(buf);
} else {
readlen = sizeof(buf);
}
nread = read(fd,buf,readlen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册