summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/TcpConnector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/TcpConnector.cpp')
-rw-r--r--cpp/src/Ice/TcpConnector.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/Ice/TcpConnector.cpp b/cpp/src/Ice/TcpConnector.cpp
index 007824a952b..5979914fedd 100644
--- a/cpp/src/Ice/TcpConnector.cpp
+++ b/cpp/src/Ice/TcpConnector.cpp
@@ -122,7 +122,14 @@ bool
IceInternal::TcpConnector::equivalent(const string& host, int port) const
{
struct sockaddr_in addr;
- getAddress(host, port, addr);
+ try
+ {
+ getAddress(host, port, addr);
+ }
+ catch(const DNSException&)
+ {
+ return false;
+ }
return compareAddress(addr, _addr) == 0;
}