From c467acc38800d8ce49fb8d171337c07255b533e6 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 15 May 2021 19:21:38 +0300 Subject: [PATCH] Fix /v3 appendage to etcd URLs without /v3 --- src/etcd_state_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etcd_state_client.cpp b/src/etcd_state_client.cpp index 15b7c833..527047ef 100644 --- a/src/etcd_state_client.cpp +++ b/src/etcd_state_client.cpp @@ -84,7 +84,7 @@ void etcd_state_client_t::add_etcd_url(std::string addr) printf("HTTPS is unsupported for etcd. Either use plain HTTP or setup a local proxy for etcd interaction\n"); exit(1); } - if (addr.find('/') < 0) + if (addr.find('/') == std::string::npos) addr += "/v3"; this->etcd_addresses.push_back(addr); }