summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/src/IceDiscovery/PluginI.cpp7
-rw-r--r--cpp/src/IceLocatorDiscovery/PluginI.cpp8
2 files changed, 13 insertions, 2 deletions
diff --git a/cpp/src/IceDiscovery/PluginI.cpp b/cpp/src/IceDiscovery/PluginI.cpp
index 32802631c43..fd4d6dbdf03 100644
--- a/cpp/src/IceDiscovery/PluginI.cpp
+++ b/cpp/src/IceDiscovery/PluginI.cpp
@@ -107,7 +107,12 @@ PluginI::initialize()
try
{
// Ensure we can establish a connection to the multicast proxy
- lookupPrx->ice_getConnection();
+ // but don't block.
+ Ice::AsyncResultPtr result = lookupPrx->begin_ice_getConnection();
+ if(result->sentSynchronously())
+ {
+ lookupPrx->end_ice_getConnection(result);
+ }
}
catch(const Ice::LocalException& ex)
{
diff --git a/cpp/src/IceLocatorDiscovery/PluginI.cpp b/cpp/src/IceLocatorDiscovery/PluginI.cpp
index 2e9b3ef0265..57f27179510 100644
--- a/cpp/src/IceLocatorDiscovery/PluginI.cpp
+++ b/cpp/src/IceLocatorDiscovery/PluginI.cpp
@@ -214,7 +214,13 @@ PluginI::initialize()
lookupPrx = lookupPrx->ice_collocationOptimized(false); // No collocation optimization for the multicast proxy!
try
{
- lookupPrx->ice_getConnection(); // Ensure we can establish a connection to the multicast proxy
+ // Ensure we can establish a connection to the multicast proxy
+ // but don't block.
+ Ice::AsyncResultPtr result = lookupPrx->begin_ice_getConnection();
+ if(result->sentSynchronously())
+ {
+ lookupPrx->end_ice_getConnection(result);
+ }
}
catch(const Ice::LocalException& ex)
{