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
36a9802c
Commit
36a9802c
authored
Jul 27, 2015
by
Jan-Erik Rediger
Browse files
Prevent crash on pending replies in async code
Fixes #335.
parent
ded53747
Changes
1
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
36a9802c
...
...
@@ -418,7 +418,8 @@ void redisProcessCallbacks(redisAsyncContext *ac) {
if
(
reply
==
NULL
)
{
/* When the connection is being disconnected and there are
* no more replies, this is the cue to really disconnect. */
if
(
c
->
flags
&
REDIS_DISCONNECTING
&&
sdslen
(
c
->
obuf
)
==
0
)
{
if
(
c
->
flags
&
REDIS_DISCONNECTING
&&
sdslen
(
c
->
obuf
)
==
0
&&
ac
->
replies
.
head
==
NULL
)
{
__redisAsyncDisconnect
(
ac
);
return
;
}
...
...
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