You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2019/07/02 21:38:12 UTC

[pulsar] branch master updated: Fixed C++ client lookup over HTTP on standalone (#4625)

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 eea53b7  Fixed C++ client lookup over HTTP on standalone (#4625)
eea53b7 is described below

commit eea53b7b04f1883e0b4ff8d880731a8ee0c1c92d
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Tue Jul 2 14:38:07 2019 -0700

    Fixed C++ client lookup over HTTP on standalone (#4625)
---
 pulsar-client-cpp/lib/HTTPLookupService.cc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/pulsar-client-cpp/lib/HTTPLookupService.cc b/pulsar-client-cpp/lib/HTTPLookupService.cc
index e62e78b..72b7a44 100644
--- a/pulsar-client-cpp/lib/HTTPLookupService.cc
+++ b/pulsar-client-cpp/lib/HTTPLookupService.cc
@@ -314,10 +314,13 @@ LookupDataResultPtr HTTPLookupService::parseLookupData(const std::string &json)
         return LookupDataResultPtr();
     }
 
-    const std::string brokerUrlTls = root.get<std::string>("brokerUrlTls", defaultNotFoundString);
+    std::string brokerUrlTls = root.get<std::string>("brokerUrlTls", defaultNotFoundString);
     if (brokerUrlTls == defaultNotFoundString) {
-        LOG_ERROR("malformed json! - brokerUrlTls not present" << json);
-        return LookupDataResultPtr();
+        brokerUrlTls = root.get<std::string>("brokerUrlSsl", defaultNotFoundString);
+        if (brokerUrlTls == defaultNotFoundString) {
+            LOG_ERROR("malformed json! - brokerUrlTls not present" << json);
+            return LookupDataResultPtr();
+        }
     }
 
     LookupDataResultPtr lookupDataResultPtr = std::make_shared<LookupDataResult>();