Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto_fwd_resp_handler should forward resp->get_result_code (#497) #498

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

byronhe
Copy link
Contributor

@byronhe byronhe commented Apr 2, 2024

No description provided.

Copy link
Contributor

@greensky00 greensky00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @byronhe for addressing this issue.

In addition to your fix, there is one more bug here: code should be set to FAILED when err exists:

    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();
    }

Also code should be set regardless of resp->get_accepted().

If you don't mind, can you please fix this as well?

@byronhe
Copy link
Contributor Author

byronhe commented Apr 17, 2024

Thanks @byronhe for addressing this issue.

In addition to your fix, there is one more bug here: code should be set to FAILED when err exists:

    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();
    }

Also code should be set regardless of resp->get_accepted().

If you don't mind, can you please fix this as well?

Thank you for your suggestion. I made fix according to your advice. Could you please review it again?

Copy link
Contributor

@greensky00 greensky00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@greensky00 greensky00 merged commit d195630 into eBay:master Apr 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants