From d62c183d2ff0007c74f266ad7bdb974f1b568d93 Mon Sep 17 00:00:00 2001 From: byronhe Date: Wed, 17 Apr 2024 16:26:19 +0800 Subject: [PATCH] auto_fwd_resp_handler should forward resp->get_result_code (#497) --- src/handle_user_cmd.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handle_user_cmd.cxx b/src/handle_user_cmd.cxx index 391bd9e6..8f07390f 100644 --- a/src/handle_user_cmd.cxx +++ b/src/handle_user_cmd.cxx @@ -344,12 +344,13 @@ void raft_server::auto_fwd_resp_handler( ptr>> presult, if (err) { perr = err; + code = cmd_result_code::FAILED; } else { if (resp->get_accepted()) { resp_ctx = resp->get_ctx(); presult->accept(); - code = resp->get_result_code(); } + code = resp->get_result_code(); } presult->set_result(resp_ctx, perr, code);