From 14d96780bf4ae2b1ebff1fb96291c7181da385b3 Mon Sep 17 00:00:00 2001 From: samur Date: Fri, 29 Jan 2021 08:23:16 +0300 Subject: [PATCH] timeout data type changed to long. --- etcd/Client.hpp | 4 ++-- etcd/SyncClient.hpp | 4 ++-- etcd/v3/Action.hpp | 2 +- src/Client.cpp | 4 ++-- src/SyncClient.cpp | 4 ++-- src/v3/Action.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/etcd/Client.hpp b/etcd/Client.hpp index c1dddca..b9e847c 100644 --- a/etcd/Client.hpp +++ b/etcd/Client.hpp @@ -129,7 +129,7 @@ const bool authenticate(std::shared_ptr const &channel, } etcd::Client::Client(std::string const & address, - const unsigned int& timeout, + const long& timeout, std::string const & load_balancer) { // create channels @@ -152,7 +152,7 @@ etcd::Client::Client(std::string const & address, etcd::Client::Client(std::string const & address, std::string const & username, std::string const & password, - const unsigned int& timeout, + const long& timeout, std::string const & load_balancer) { // create channels diff --git a/etcd/SyncClient.hpp b/etcd/SyncClient.hpp index 4369e80..0177b8b 100644 --- a/etcd/SyncClient.hpp +++ b/etcd/SyncClient.hpp @@ -27,7 +27,7 @@ namespace etcd * @param load_balancer is the load balance strategy, can be one of round_robin/pick_first/grpclb/xds. */ SyncClient(std::string const & etcd_url, - const unsigned int& timeout = std::numeric_limits::max(), + const long& timeout = std::numeric_limits::max(), std::string const & load_balancer = "round_robin"); /** @@ -43,7 +43,7 @@ namespace etcd SyncClient(std::string const & etcd_url, std::string const & username, std::string const & password, - const unsigned int& timeout = std::numeric_limits::max(), + const long& timeout = std::numeric_limits::max(), std::string const & load_balancer = "round_robin"); Response get(std::string const & key); diff --git a/etcd/v3/Action.hpp b/etcd/v3/Action.hpp index 961dee8..304b64f 100644 --- a/etcd/v3/Action.hpp +++ b/etcd/v3/Action.hpp @@ -42,7 +42,7 @@ namespace etcdv3 Watch::Stub* watch_stub; Lease::Stub* lease_stub; Lock::Stub* lock_stub; - unsigned int timeout; + long timeout; }; class Action diff --git a/src/Client.cpp b/src/Client.cpp index c1dddca..b9e847c 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -129,7 +129,7 @@ const bool authenticate(std::shared_ptr const &channel, } etcd::Client::Client(std::string const & address, - const unsigned int& timeout, + const long& timeout, std::string const & load_balancer) { // create channels @@ -152,7 +152,7 @@ etcd::Client::Client(std::string const & address, etcd::Client::Client(std::string const & address, std::string const & username, std::string const & password, - const unsigned int& timeout, + const long& timeout, std::string const & load_balancer) { // create channels diff --git a/src/SyncClient.cpp b/src/SyncClient.cpp index 7f9329b..55b8196 100644 --- a/src/SyncClient.cpp +++ b/src/SyncClient.cpp @@ -10,7 +10,7 @@ return etcd::Response(500, ex.what()); \ } -etcd::SyncClient::SyncClient(std::string const & address, const unsigned int& timeout, std::string const & load_balancer) +etcd::SyncClient::SyncClient(std::string const & address, const long& timeout, std::string const & load_balancer) : client(address, timeout, load_balancer) { } @@ -18,7 +18,7 @@ etcd::SyncClient::SyncClient(std::string const & address, const unsigned int& ti etcd::SyncClient::SyncClient(std::string const & address, std::string const & username, std::string const & password, - const unsigned int& timeout, + const long& timeout, std::string const & load_balancer) : client(address, username, password, timeout, load_balancer) { diff --git a/src/v3/Action.cpp b/src/v3/Action.cpp index e9c4ce1..15841b7 100644 --- a/src/v3/Action.cpp +++ b/src/v3/Action.cpp @@ -23,7 +23,7 @@ etcdv3::ActionParameters::ActionParameters() kv_stub = NULL; watch_stub = NULL; lease_stub = NULL; - timeout = std::numeric_limits::max(); + timeout = std::numeric_limits::max(); } void etcdv3::Action::waitForResponse()