From 7a80e7c7504e1749acb576790e09d559a7ad43bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Thu, 15 Aug 2024 16:33:11 +0200 Subject: [PATCH] Keep error message from hiredis redisAsyncFormattedCommand() --- hircluster.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hircluster.c b/hircluster.c index 624e883..aec5fa3 100644 --- a/hircluster.c +++ b/hircluster.c @@ -4232,6 +4232,7 @@ int redisClusterAsyncFormattedCommand(redisClusterAsyncContext *acc, status = redisAsyncFormattedCommand(ac, redisClusterAsyncCallback, cad, cmd, len); if (status != REDIS_OK) { + __redisClusterAsyncSetError(acc, ac->err, ac->errstr); goto error; } @@ -4312,9 +4313,10 @@ int redisClusterAsyncFormattedCommandToNode(redisClusterAsyncContext *acc, status = redisAsyncFormattedCommand(ac, redisClusterAsyncCallback, cad, cmd, len); - if (status != REDIS_OK) + if (status != REDIS_OK) { + __redisClusterAsyncSetError(acc, ac->err, ac->errstr); goto error; - + } return REDIS_OK; oom: