summaryrefslogtreecommitdiff
path: root/cpp/src/IceDiscovery/PluginI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceDiscovery/PluginI.cpp')
-rw-r--r--cpp/src/IceDiscovery/PluginI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/IceDiscovery/PluginI.cpp b/cpp/src/IceDiscovery/PluginI.cpp
index 88c2bb91ba5..60bdf42e9a4 100644
--- a/cpp/src/IceDiscovery/PluginI.cpp
+++ b/cpp/src/IceDiscovery/PluginI.cpp
@@ -41,8 +41,9 @@ PluginI::initialize()
Ice::PropertiesPtr properties = _communicator->getProperties();
bool ipv4 = properties->getPropertyAsIntWithDefault("Ice.IPv4", 1) > 0;
+ bool preferIPv6 = properties->getPropertyAsInt("Ice.PreferIPv6Address") > 0;
string address;
- if(ipv4)
+ if(ipv4 && !preferIPv6)
{
address = properties->getPropertyWithDefault("IceDiscovery.Address", "239.255.0.1");
}