Ensure we curry any connect error to an async context.
This commit is contained in:
parent
b6f86f38c2
commit
5850a8ecd2
5
async.c
5
async.c
@ -604,7 +604,8 @@ static int __redisAsyncHandleConnect(redisAsyncContext *ac) {
|
|||||||
|
|
||||||
if (redisCheckConnectDone(c, &completed) == REDIS_ERR) {
|
if (redisCheckConnectDone(c, &completed) == REDIS_ERR) {
|
||||||
/* Error! */
|
/* Error! */
|
||||||
redisCheckSocketError(c);
|
if (redisCheckSocketError(c) == REDIS_ERR)
|
||||||
|
__redisAsyncCopyError(ac);
|
||||||
__redisAsyncHandleConnectFailure(ac);
|
__redisAsyncHandleConnectFailure(ac);
|
||||||
return REDIS_ERR;
|
return REDIS_ERR;
|
||||||
} else if (completed == 1) {
|
} else if (completed == 1) {
|
||||||
@ -696,7 +697,7 @@ void redisAsyncHandleTimeout(redisAsyncContext *ac) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ac->c.command_timeout ||
|
if (!ac->c.command_timeout ||
|
||||||
(!ac->c.command_timeout->tv_sec && !ac->c.command_timeout->tv_usec)) {
|
(!ac->c.command_timeout->tv_sec && !ac->c.command_timeout->tv_usec)) {
|
||||||
/* A belated connect timeout arriving, ignore */
|
/* A belated connect timeout arriving, ignore */
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user