Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a0dd6f82
Commit
a0dd6f82
authored
Sep 04, 2018
by
antirez
Browse files
Clarify why remaining may be zero in readQueryFromClient().
See #5304.
parent
2eed31a5
Changes
1
Show whitespace changes
Inline
Side-by-side
src/networking.c
View file @
a0dd6f82
...
...
@@ -1466,6 +1466,8 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
{
ssize_t
remaining
=
(
size_t
)(
c
->
bulklen
+
2
)
-
sdslen
(
c
->
querybuf
);
/* Note that the 'remaining' variable may be zero in some edge case,
* for example once we resume a blocked client after CLIENT PAUSE. */
if
(
remaining
>
0
&&
remaining
<
readlen
)
readlen
=
remaining
;
}
...
...
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