From a9dd349e2499aa37ad1628eb4f432e87cdabce96 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Fri, 27 Jun 2014 17:48:28 +0200 Subject: Fixed IceDiscovery test issue on CentOS 6.3 --- cpp/src/IceDiscovery/PluginI.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cpp/src/IceDiscovery/PluginI.cpp') 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 -- cgit v1.2.3