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

Handle errors on request_shutdown #132

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

Anilm3
Copy link
Collaborator

@Anilm3 Anilm3 commented Sep 23, 2022

Description

When request_shutdown with side-effects was introduced, the appropriate RSHUTDOWN code was not updated to handle errors. This simply requires closing the connection when a network error is received and log a message otherwise.

Motivation

Additional Notes

Describe how to test your changes

Readiness checklist

  • Unit tests have been updated and pass
  • If known, an appropriate milestone has been selected
  • All new source files include the required notice

Release checklist

  • The CHANGELOG.md has been updated

estringana
estringana previously approved these changes Sep 23, 2022
UNUSED(dd_request_shutdown(conn));
int res = dd_request_shutdown(conn);
if (res == dd_network) {
mlog_g(dd_log_info,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be error instead of info?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's other error logs before getting here so these are fine as info.

@codecov-commenter
Copy link

Codecov Report

Merging #132 (c2fb1ee) into master (68499f7) will increase coverage by 6.01%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
+ Coverage   63.17%   69.19%   +6.01%     
==========================================
  Files          63       21      -42     
  Lines        4253     2756    -1497     
  Branches     1286      632     -654     
==========================================
- Hits         2687     1907     -780     
+ Misses        815      515     -300     
+ Partials      751      334     -417     
Flag Coverage Δ
extension 69.19% <50.00%> (-0.06%) ⬇️
helper ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/extension/ddappsec.c 67.67% <50.00%> (-0.72%) ⬇️
src/helper/network/acceptor.cpp
src/helper/engine.hpp
src/helper/parameter_base.cpp
src/helper/rate_limit.cpp
src/helper/runner.cpp
src/helper/network/broker.cpp
src/helper/subscriber/base.hpp
src/helper/client_settings.cpp
src/helper/remote_config/config.hpp
... and 33 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Anilm3 Anilm3 merged commit fa0ad43 into master Sep 23, 2022
@Anilm3 Anilm3 deleted the anilm3/request_shutdown_error_handling branch September 23, 2022 15:15
Anilm3 added a commit that referenced this pull request Sep 23, 2022
estringana pushed a commit that referenced this pull request Oct 4, 2022
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.

3 participants