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/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 2fb8cfe optimizer ssl hint for cpp (#4505)
2fb8cfe is described below
commit 2fb8cfe13130b87cb011c1e37ac5b8dfd5605acb
Author: lan <[email protected]>
AuthorDate: Fri Jun 14 08:10:54 2019 +0800
optimizer ssl hint for cpp (#4505)
* optimizer ssl hint for cpp
* format cpp code
---
pulsar-client-cpp/lib/ClientConnection.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pulsar-client-cpp/lib/ClientConnection.cc
b/pulsar-client-cpp/lib/ClientConnection.cc
index 38dba90..d6a962a 100644
--- a/pulsar-client-cpp/lib/ClientConnection.cc
+++ b/pulsar-client-cpp/lib/ClientConnection.cc
@@ -119,6 +119,9 @@ static Result getResult(ServerError serverError) {
}
static bool file_exists(const std::string& path) {
+ if (path.empty()) {
+ return false;
+ }
std::ifstream f(path);
return f.good();
}