summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-02-09 10:18:56 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-02-09 10:18:56 +0000
commite4e0e6770fc8fe1176b6cb7b6105a28342f9b2c8 (patch)
tree64f480348b3f509397473d6d850aa245ca474264 /cpp/src
parentupdating Ice::Connection for bidir (diff)
downloadice-e4e0e6770fc8fe1176b6cb7b6105a28342f9b2c8.tar.bz2
ice-e4e0e6770fc8fe1176b6cb7b6105a28342f9b2c8.tar.xz
ice-e4e0e6770fc8fe1176b6cb7b6105a28342f9b2c8.zip
Ignore exceptions when calling setAdapter
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index 750711296c4..0b078efe293 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -410,7 +410,16 @@ IceInternal::OutgoingConnectionFactory::setRouter(const RouterPrx& router)
while(pr.first != pr.second)
{
- pr.first->second->setAdapter(adapter);
+ try
+ {
+ pr.first->second->setAdapter(adapter);
+ }
+ catch(const Ice::LocalException&)
+ {
+ //
+ // Ignore, the connection is being closed or closed.
+ //
+ }
++pr.first;
}
}
@@ -431,7 +440,16 @@ IceInternal::OutgoingConnectionFactory::removeAdapter(const ObjectAdapterPtr& ad
{
if(p->second->getAdapter() == adapter)
{
- p->second->setAdapter(0);
+ try
+ {
+ p->second->setAdapter(0);
+ }
+ catch(const Ice::LocalException&)
+ {
+ //
+ // Ignore, the connection is being closed or closed.
+ //
+ }
}
}
}