diff options
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. + // + } } } } |