diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceDiscovery/LookupI.cpp | 8 | ||||
-rw-r--r-- | cpp/src/IceDiscovery/PluginI.cpp | 13 |
2 files changed, 17 insertions, 4 deletions
diff --git a/cpp/src/IceDiscovery/LookupI.cpp b/cpp/src/IceDiscovery/LookupI.cpp index 01e33ca1a2b..9dd9aa4ce2f 100644 --- a/cpp/src/IceDiscovery/LookupI.cpp +++ b/cpp/src/IceDiscovery/LookupI.cpp @@ -166,7 +166,7 @@ LookupI::findObject(const Ice::AMD_Locator_findObjectByIdPtr& cb, const Ice::Ide if(p->second->addCallback(cb)) { - _lookup->findObjectById(_domainId, id, _lookupReply); + _lookup->begin_findObjectById(_domainId, id, _lookupReply); _timer->schedule(p->second, _timeout); } } @@ -183,7 +183,7 @@ LookupI::findAdapter(const Ice::AMD_Locator_findAdapterByIdPtr& cb, const std::s if(p->second->addCallback(cb)) { - _lookup->findAdapterById(_domainId, adapterId, _lookupReply); + _lookup->begin_findAdapterById(_domainId, adapterId, _lookupReply); _timer->schedule(p->second, _timeout); } } @@ -232,7 +232,7 @@ LookupI::objectRequestTimedOut(const ObjectRequestPtr& request) if(request->retry()) { - _lookup->findObjectById(_domainId, request->getId(), _lookupReply); + _lookup->begin_findObjectById(_domainId, request->getId(), _lookupReply); _timer->schedule(p->second, _timeout); } else @@ -255,7 +255,7 @@ LookupI::adapterRequestTimedOut(const AdapterRequestPtr& request) if(request->retry()) { - _lookup->findAdapterById(_domainId, request->getId(), _lookupReply); + _lookup->begin_findAdapterById(_domainId, request->getId(), _lookupReply); _timer->schedule(p->second, _timeout); } else diff --git a/cpp/src/IceDiscovery/PluginI.cpp b/cpp/src/IceDiscovery/PluginI.cpp index 643bc894a2d..01846fb7eab 100644 --- a/cpp/src/IceDiscovery/PluginI.cpp +++ b/cpp/src/IceDiscovery/PluginI.cpp @@ -103,6 +103,19 @@ PluginI::initialize() Ice::ObjectPrx lookupPrx = _communicator->stringToProxy("IceDiscovery/Lookup -d:" + lookupEndpoints); lookupPrx = lookupPrx->ice_collocationOptimized(false); // No collocation optimization for the multicast proxy! + try + { + // Ensure we can establish a connection to the multicast proxy + lookupPrx->ice_getConnection(); + } + catch(const Ice::LocalException& ex) + { + ostringstream os; + os << "unable to establish multicast connection, IceDiscovery will be disabled:\n"; + os << "proxy = " << lookupPrx << '\n'; + os << ex; + throw Ice::PluginInitializationException(__FILE__, __LINE__, os.str()); + } // // Add lookup and lookup reply Ice objects |