Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
dbfdd991
Commit
dbfdd991
authored
Oct 17, 2014
by
antirez
Browse files
Diskless replication: swap inverted branches to compute read len.
parent
d1b54c46
Changes
1
Show whitespace changes
Inline
Side-by-side
src/replication.c
View file @
dbfdd991
...
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment