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
667dbf53
Unverified
Commit
667dbf53
authored
May 02, 2021
by
Michael Grunder
Committed by
GitHub
May 02, 2021
Browse files
Merge pull request #935 from kristjanvalur/pr5
Bugfix: Ignore timeout callback from a successful connect (fixes #945)
parents
9bf6c250
e06ecf7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
667dbf53
...
@@ -690,9 +690,17 @@ void redisAsyncHandleTimeout(redisAsyncContext *ac) {
...
@@ -690,9 +690,17 @@ void redisAsyncHandleTimeout(redisAsyncContext *ac) {
redisContext
*
c
=
&
(
ac
->
c
);
redisContext
*
c
=
&
(
ac
->
c
);
redisCallback
cb
;
redisCallback
cb
;
if
((
c
->
flags
&
REDIS_CONNECTED
)
&&
ac
->
replies
.
head
==
NULL
)
{
if
((
c
->
flags
&
REDIS_CONNECTED
))
{
/* Nothing to do - just an idle timeout */
if
(
ac
->
replies
.
head
==
NULL
)
{
return
;
/* Nothing to do - just an idle timeout */
return
;
}
if
(
!
ac
->
c
.
command_timeout
||
(
!
ac
->
c
.
command_timeout
->
tv_sec
&&
!
ac
->
c
.
command_timeout
->
tv_usec
))
{
/* A belated connect timeout arriving, ignore */
return
;
}
}
}
if
(
!
c
->
err
)
{
if
(
!
c
->
err
)
{
...
...
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