Ignore timeout callback from a successful connect
This commit is contained in:
parent
dfa33e60b0
commit
e06ecf7e45
14
async.c
14
async.c
@ -690,9 +690,17 @@ void redisAsyncHandleTimeout(redisAsyncContext *ac) {
|
||||
redisContext *c = &(ac->c);
|
||||
redisCallback cb;
|
||||
|
||||
if ((c->flags & REDIS_CONNECTED) && ac->replies.head == NULL) {
|
||||
/* Nothing to do - just an idle timeout */
|
||||
return;
|
||||
if ((c->flags & REDIS_CONNECTED)) {
|
||||
if ( ac->replies.head == NULL) {
|
||||
/* 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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user