From 5850a8ecd2fb4ab39d80773e3017f02aff097ec4 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Thu, 17 Jun 2021 13:01:15 -0700 Subject: Ensure we curry any connect error to an async context. --- async.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/async.c b/async.c index 3f31286..29f6924 100644 --- a/async.c +++ b/async.c @@ -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; -- cgit v1.2.3