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
fix(common): better defaults for curl initialization #9798
fix(common): better defaults for curl initialization #9798
Conversation
By default, initialize libcurl with locking and signal handlers that work for most applications. In particular, leaving the default handler for `SIGPIPE` usually results in the application crashes when a socket is closed.
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have an Options CurlDefaultOptions(Options)
, where we can default these values to true (and test that the defaults are correct)?
Maybe we call it here:
options_(std::move(options)) { |
Codecov Report
@@ Coverage Diff @@
## main #9798 +/- ##
=======================================
Coverage 94.22% 94.22%
=======================================
Files 1495 1495
Lines 139801 139816 +15
=======================================
+ Hits 131725 131744 +19
+ Misses 8076 8072 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
By default, initialize libcurl with locking and signal handlers that work for most applications. In particular, leaving the default handler for
SIGPIPE
usually results in the application crashes when a socket is closed.This change is