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

Flush socket on body limit #233

Merged
merged 4 commits into from
Apr 3, 2023
Merged

Flush socket on body limit #233

merged 4 commits into from
Apr 3, 2023

Conversation

Anilm3
Copy link
Collaborator

@Anilm3 Anilm3 commented Apr 3, 2023

Description

At some point the code was refactored and non-critical errors in the communication were introduced, however the body limit error was considered to be non-critical, however it left the socket in an undefined state which then resulted in a cascade of small errors. This PR introduces a fix to ensure errors that leave the socket in an undefined state close the connection and that the body limit exceeded error is handled by flushing the socket of the message body.

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

src/extension/network.c Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #233 (8feb0d2) into master (97bba78) will decrease coverage by 0.28%.
The diff coverage is 19.44%.

❗ Current head 8feb0d2 differs from pull request most recent head 9b92eda. Consider uploading reports for the commit 9b92eda to get more accurate results

@@            Coverage Diff             @@
##           master     #233      +/-   ##
==========================================
- Coverage   64.19%   63.92%   -0.28%     
==========================================
  Files          88       88              
  Lines        5628     5655      +27     
  Branches     1783     1794      +11     
==========================================
+ Hits         3613     3615       +2     
- Misses        948      969      +21     
- Partials     1067     1071       +4     
Flag Coverage Δ
extension 71.54% <ø> (ø)
helper 53.35% <19.44%> (-0.53%) ⬇️

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

Impacted Files Coverage Δ
src/extension/network.c 50.00% <ø> (ø)
src/helper/network/socket.cpp 0.00% <0.00%> (ø)
src/helper/network/socket.hpp 20.00% <ø> (ø)
src/helper/client.cpp 40.28% <27.77%> (-1.66%) ⬇️
src/helper/network/broker.cpp 40.00% <28.57%> (ø)

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

@Anilm3 Anilm3 merged commit f00f698 into master Apr 3, 2023
@Anilm3 Anilm3 deleted the anilm3/flush-on-fail branch April 3, 2023 15:53
Anilm3 added a commit that referenced this pull request Apr 5, 2023
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.

None yet

3 participants