summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rw-r--r--cpp/src/Ice/Network.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 1fb9491e479..0bd0fa8bd4a 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -1414,8 +1414,12 @@ IceInternal::getAddresses(const string& host, int port, bool blocking)
rs = getaddrinfo(host.c_str(), 0, &hints, &info);
}
while(info == 0 && rs == EAI_AGAIN && --retry >= 0);
-
- if(rs != 0)
+
+ if(!blocking && rs == EAI_NONAME)
+ {
+ return result; // Empty result indicates that a blocking lookup is necessary.
+ }
+ else if(rs != 0)
{
DNSException ex(__FILE__, __LINE__);
ex.error = rs;