summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/RegistryI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/RegistryI.cpp')
-rw-r--r--cpp/src/IceGrid/RegistryI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp
index 843b8b15cfa..e49f0cf49bf 100644
--- a/cpp/src/IceGrid/RegistryI.cpp
+++ b/cpp/src/IceGrid/RegistryI.cpp
@@ -577,8 +577,9 @@ RegistryI::startImpl()
if(properties->getPropertyAsIntWithDefault("IceGrid.Registry.Discovery.Enabled", 1) > 0)
{
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("IceGrid.Registry.Discovery.Address", "239.255.0.1");
}