summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 199e5e1b4da..d883f3dbb0f 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -277,7 +277,11 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope
#endif
_traceLevels = new TraceLevels(_properties);
_defaultProtocol = _properties->getPropertyWithDefault("Ice.DefaultProtocol", "tcp");
- _defaultHost = _properties->getPropertyWithDefault("Ice.DefaultHost", "127.0.0.1");
+ _defaultHost = _properties->getProperty("Ice.DefaultHost");
+ if (_defaultHost.empty())
+ {
+ _defaultHost = getLocalHost(true);
+ }
_routerManager = new RouterManager;
_referenceFactory = new ReferenceFactory(this);
_proxyFactory = new ProxyFactory(this);