This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new f076974  Shorten the timeout value of C++ ZTS client (#2572)
f076974 is described below

commit f076974935feeece00d32094c16572ac4f45244c
Author: massakam <massa...@yahoo-corp.jp>
AuthorDate: Thu Sep 20 09:11:45 2018 +0900

    Shorten the timeout value of C++ ZTS client (#2572)
    
    * Shorten the timeout value of C++ ZTS client
    
    * Set REQUEST_TIMEOUT to 30000ms
---
 pulsar-client-cpp/lib/auth/athenz/ZTSClient.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pulsar-client-cpp/lib/auth/athenz/ZTSClient.cc 
b/pulsar-client-cpp/lib/auth/athenz/ZTSClient.cc
index 93010af..3097c30 100644
--- a/pulsar-client-cpp/lib/auth/athenz/ZTSClient.cc
+++ b/pulsar-client-cpp/lib/auth/athenz/ZTSClient.cc
@@ -45,7 +45,7 @@ namespace pulsar {
 
 const static std::string DEFAULT_PRINCIPAL_HEADER = "Athenz-Principal-Auth";
 const static std::string DEFAULT_ROLE_HEADER = "Athenz-Role-Auth";
-const static int REQUEST_TIMEOUT = 10000;
+const static int REQUEST_TIMEOUT = 30000;
 const static int DEFAULT_TOKEN_EXPIRATION_TIME_SEC = 3600;
 const static int MIN_TOKEN_EXPIRATION_TIME_SEC = 900;
 const static int MAX_HTTP_REDIRECTS = 20;
@@ -272,7 +272,7 @@ const std::string ZTSClient::getRoleToken() const {
     curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1L);
 
     // Timer
-    curl_easy_setopt(handle, CURLOPT_TIMEOUT, REQUEST_TIMEOUT);
+    curl_easy_setopt(handle, CURLOPT_TIMEOUT_MS, REQUEST_TIMEOUT);
 
     // Redirects
     curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);

Reply via email to