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
5850a8ec
Commit
5850a8ec
authored
Jun 17, 2021
by
michael-grunder
Browse files
Ensure we curry any connect error to an async context.
parent
b6f86f38
Changes
1
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
5850a8ec
...
...
@@ -604,7 +604,8 @@ static int __redisAsyncHandleConnect(redisAsyncContext *ac) {
if
(
redisCheckConnectDone
(
c
,
&
completed
)
==
REDIS_ERR
)
{
/* Error! */
redisCheckSocketError
(
c
);
if
(
redisCheckSocketError
(
c
)
==
REDIS_ERR
)
__redisAsyncCopyError
(
ac
);
__redisAsyncHandleConnectFailure
(
ac
);
return
REDIS_ERR
;
}
else
if
(
completed
==
1
)
{
...
...
@@ -696,7 +697,7 @@ void redisAsyncHandleTimeout(redisAsyncContext *ac) {
return
;
}
if
(
!
ac
->
c
.
command_timeout
||
if
(
!
ac
->
c
.
command_timeout
||
(
!
ac
->
c
.
command_timeout
->
tv_sec
&&
!
ac
->
c
.
command_timeout
->
tv_usec
))
{
/* A belated connect timeout arriving, ignore */
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