Skip to content

Commit

Permalink
Fix error message in valkeyClusterAsyncFormattedCommand
Browse files Browse the repository at this point in the history
Keep the error message received from valkeyAsyncFormattedCommand()
in the cluster context.

Signed-off-by: Björn Svensson <[email protected]>
  • Loading branch information
bjosv committed Aug 19, 2024
1 parent a472f2a commit facee13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/valkeycluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -3417,6 +3417,7 @@ int valkeyClusterAsyncFormattedCommand(valkeyClusterAsyncContext *acc,
status = valkeyAsyncFormattedCommand(ac, valkeyClusterAsyncCallback, cad,
cmd, len);
if (status != VALKEY_OK) {
valkeyClusterAsyncSetError(acc, ac->err, ac->errstr);
goto error;
}
return VALKEY_OK;
Expand Down Expand Up @@ -3485,8 +3486,10 @@ int valkeyClusterAsyncFormattedCommandToNode(valkeyClusterAsyncContext *acc,

status = valkeyAsyncFormattedCommand(ac, valkeyClusterAsyncCallback, cad,
cmd, len);
if (status != VALKEY_OK)
if (status != VALKEY_OK) {
valkeyClusterAsyncSetError(acc, ac->err, ac->errstr);
goto error;
}

return VALKEY_OK;

Expand Down

0 comments on commit facee13

Please sign in to comment.