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
0c5a06f6
Commit
0c5a06f6
authored
Oct 17, 2014
by
antirez
Browse files
Diskless replication: swap inverted branches to compute read len.
parent
80f7f63b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/replication.c
View file @
0c5a06f6
...
@@ -881,10 +881,10 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) {
...
@@ -881,10 +881,10 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) {
/* Read bulk data */
/* Read bulk data */
if
(
usemark
)
{
if
(
usemark
)
{
readlen
=
sizeof
(
buf
);
}
else
{
left
=
server
.
repl_transfer_size
-
server
.
repl_transfer_read
;
left
=
server
.
repl_transfer_size
-
server
.
repl_transfer_read
;
readlen
=
(
left
<
(
signed
)
sizeof
(
buf
))
?
left
:
(
signed
)
sizeof
(
buf
);
readlen
=
(
left
<
(
signed
)
sizeof
(
buf
))
?
left
:
(
signed
)
sizeof
(
buf
);
}
else
{
readlen
=
sizeof
(
buf
);
}
}
nread
=
read
(
fd
,
buf
,
readlen
);
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