diff options
author | michael-grunder <michael.grunder@gmail.com> | 2021-06-17 13:01:15 -0700 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2021-06-17 13:37:49 -0700 |
commit | 5850a8ecd2fb4ab39d80773e3017f02aff097ec4 (patch) | |
tree | 6a85e3ff1f40f0deaa1438404d4f41e7cf90b7f7 | |
parent | b6f86f38c2bbf0caa63d489174ac3a9777b97807 (diff) |
Ensure we curry any connect error to an async context.
-rw-r--r-- | async.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |