diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-02-09 10:18:56 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-02-09 10:18:56 +0000 |
commit | e4e0e6770fc8fe1176b6cb7b6105a28342f9b2c8 (patch) | |
tree | 64f480348b3f509397473d6d850aa245ca474264 /cpp/src | |
parent | updating Ice::Connection for bidir (diff) | |
download | ice-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.cpp | 22 |
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. + // + } } } } |