summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-12-05 16:34:52 +0100
committerJose <jose@zeroc.com>2019-12-05 16:34:52 +0100
commit1acaa2112ff6a6a19bffeecebe83e1764903acdb (patch)
treecd38476cc7109589f21b404df18f2d8feb891553 /cpp/src
parentFix nodiscard warnings report by Visual Studio 2019 (16.4.0) (diff)
downloadice-1acaa2112ff6a6a19bffeecebe83e1764903acdb.tar.bz2
ice-1acaa2112ff6a6a19bffeecebe83e1764903acdb.tar.xz
ice-1acaa2112ff6a6a19bffeecebe83e1764903acdb.zip
Ignore null locator replies
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceLocatorDiscovery/PluginI.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/cpp/src/IceLocatorDiscovery/PluginI.cpp b/cpp/src/IceLocatorDiscovery/PluginI.cpp
index 92295c261c0..864e3c272c8 100644
--- a/cpp/src/IceLocatorDiscovery/PluginI.cpp
+++ b/cpp/src/IceLocatorDiscovery/PluginI.cpp
@@ -706,7 +706,18 @@ void
LocatorI::foundLocator(const Ice::LocatorPrxPtr& locator)
{
Lock sync(*this);
- if(!locator || (!_instanceName.empty() && locator->ice_getIdentity().category != _instanceName))
+
+ if(!locator)
+ {
+ if(_traceLevel > 2)
+ {
+ Ice::Trace out(_lookup->ice_getCommunicator()->getLogger(), "Lookup");
+ out << "ignoring locator reply: (null locator)";
+ }
+ return;
+ }
+
+ if(!_instanceName.empty() && locator->ice_getIdentity().category != _instanceName)
{
if(_traceLevel > 2)
{