summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/EndpointI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-12-04 10:45:33 +0100
committerBenoit Foucher <benoit@zeroc.com>2007-12-04 10:45:33 +0100
commit3beb1f44e62288277fe3b26dbd241ecc5d0ebfef (patch)
treee253bd47c271e72c761aedbb36de9d1c382e2e36 /cpp/src/Ice/EndpointI.cpp
parentFixed bug 1775 (service manager issues) (diff)
downloadice-3beb1f44e62288277fe3b26dbd241ecc5d0ebfef.tar.bz2
ice-3beb1f44e62288277fe3b26dbd241ecc5d0ebfef.tar.xz
ice-3beb1f44e62288277fe3b26dbd241ecc5d0ebfef.zip
- Fixed minor bug in Ice::Application (error message was missing ": ")
- Fixed bug where exceptions weren't correctly catched by the endpoint host resolver when doing the non-blocking getAddresses call.
Diffstat (limited to 'cpp/src/Ice/EndpointI.cpp')
-rw-r--r--cpp/src/Ice/EndpointI.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/cpp/src/Ice/EndpointI.cpp b/cpp/src/Ice/EndpointI.cpp
index f3505005f28..2ae93da7362 100644
--- a/cpp/src/Ice/EndpointI.cpp
+++ b/cpp/src/Ice/EndpointI.cpp
@@ -44,10 +44,18 @@ IceInternal::EndpointHostResolver::resolve(const string& host, int port, const E
// Try to get the addresses without DNS lookup. If this doesn't work, we queue a resolve
// entry and the thread will take care of getting the endpoint addresses.
//
- vector<struct sockaddr_in> addrs = getAddresses(host, port, false);
- if(!addrs.empty())
+ try
{
- callback->connectors(endpoint->connectors(addrs));
+ vector<struct sockaddr_in> addrs = getAddresses(host, port, false);
+ if(!addrs.empty())
+ {
+ callback->connectors(endpoint->connectors(addrs));
+ return;
+ }
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ callback->exception(ex);
return;
}