+
Skip to content

fix: SSL_shutdown on incomplete handshake #431

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

Merged
merged 2 commits into from
Jul 12, 2025
Merged

Conversation

kostasrim
Copy link
Collaborator

We should not call SSL_shutdown if the handshake is not complete.

Furthermore reduce the LOG(INFO) because they can flood and steal cpu time.

Fixes: #430

Signed-off-by: kostas <kostas@dragonflydb.io>
@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.14%. Comparing base (d30de86) to head (b33b159).
Report is 188 commits behind head on master.

Files with missing lines Patch % Lines
util/tls/tls_engine.cc 66.66% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #431      +/-   ##
==========================================
+ Coverage   77.60%   78.14%   +0.54%     
==========================================
  Files         103      112       +9     
  Lines        7824     9848    +2024     
==========================================
+ Hits         6072     7696    +1624     
- Misses       1752     2152     +400     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

state_ |= FATAL_ERROR;
queue_error = ERR_get_error();
LOG(WARNING) << "SSL protocol error " << ERROR_DETAILS;
LOG_EVERY_T(WARNING, 30) << "SSL protocol error " << ERROR_DETAILS;
Copy link
Owner

Choose a reason for hiding this comment

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

I think LOG_EVERY_T(WARNING, 1) should be good enough.

default:
queue_error = ERR_get_error();
state_ |= FATAL_ERROR;
LOG(WARNING) << "Unexpected SSL error " << ssl_error << " " << ERROR_DETAILS;
LOG_EVERY_T(WARNING, 30) << "Unexpected SSL error " << ssl_error << " " << ERROR_DETAILS;
Copy link
Owner

Choose a reason for hiding this comment

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

same

Signed-off-by: kostas <kostas@dragonflydb.io>
@romange romange merged commit d6a5f42 into romange:master Jul 12, 2025
8 checks passed
romange pushed a commit that referenced this pull request Jul 12, 2025
* fix: SSL_shutdown on incomplete handshake

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
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.

TlsSocket shutdown while in init
3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载