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
hiredis
Commits
4d8f3fb2
Commit
4d8f3fb2
authored
Jun 16, 2017
by
Jan-Erik Rediger
Committed by
GitHub
Jun 16, 2017
Browse files
Merge pull request #532 from amallia/assert-side-effects
Assert statement calls a function which has side effects
parents
97cd8157
b4641364
Changes
1
Show whitespace changes
Inline
Side-by-side
async.c
View file @
4d8f3fb2
...
...
@@ -336,7 +336,8 @@ static void __redisAsyncDisconnect(redisAsyncContext *ac) {
if
(
ac
->
err
==
0
)
{
/* For clean disconnects, there should be no pending callbacks. */
assert
(
__redisShiftCallback
(
&
ac
->
replies
,
NULL
)
==
REDIS_ERR
);
int
ret
=
__redisShiftCallback
(
&
ac
->
replies
,
NULL
);
assert
(
ret
==
REDIS_ERR
);
}
else
{
/* Disconnection is caused by an error, make sure that pending
* callbacks cannot call new commands. */
...
...
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