BewareMyPower opened a new pull request, #313:
URL: https://github.com/apache/pulsar-client-cpp/pull/313

   ### Motivation
   
   When libcurl is used in `AuthOauth2`, the `CURLOPT_NOSIGNAL` option is not 
set, i.e. it will be the default value so that the `Curl_resolv_timeout` 
function might crash in multi-threading environment.
   
   ```
   #2 0xf630 in _L_unlock_13 from /lib64/libpthread.so.0 (0x34)
   #3 0x2e6c7f in Curl_failf from /usr/local/bin/***/libpulsar.so (0x6f)
   #4 0x30a285 in Curl_resolv_timeout from /usr/local/bin/***/libpulsar.so 
(0x95)
   ```
   
   Since there are many duplicated code when calling curl C APIs, it's hard to 
notice that `CURLOPT_NOSIGNAL` is not configured in `AuthOauth2`.
   
   ### Modifications
   
   Introduce a `CurlWrapper` class that sets the same options to reduce the 
duplicated code and adapting consistent behaviors unless a few options.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [x] `doc-not-needed` 
   (Please explain why)
   
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to