diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-09-25 19:48:12 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-09-25 19:48:12 +0200 |
commit | 93a4343980b792422c09ce0a8b9a13360ffeb211 (patch) | |
tree | 530282dd34222423f146f47d23e98ac480f2becc /cpp/src/IceGrid/ServerAdapterI.cpp | |
parent | Fixed bug 3457 (diff) | |
download | ice-93a4343980b792422c09ce0a8b9a13360ffeb211.tar.bz2 ice-93a4343980b792422c09ce0a8b9a13360ffeb211.tar.xz ice-93a4343980b792422c09ce0a8b9a13360ffeb211.zip |
Fixed potential IceGrid node hang on shutdown
Diffstat (limited to 'cpp/src/IceGrid/ServerAdapterI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerAdapterI.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/ServerAdapterI.cpp b/cpp/src/IceGrid/ServerAdapterI.cpp index ba904bdf199..08ae0d9a441 100644 --- a/cpp/src/IceGrid/ServerAdapterI.cpp +++ b/cpp/src/IceGrid/ServerAdapterI.cpp @@ -96,6 +96,12 @@ ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Cur destroy(); activationFailed("server destroyed"); } + catch(const Ice::Exception& ex) + { + ostringstream os; + os << "unexpected exception: " << ex; + activationFailed(os.str()); + } } Ice::ObjectPrx @@ -188,7 +194,14 @@ ServerAdapterI::setDirectProxy(const Ice::ObjectPrx& prx, const Ice::Current&) void ServerAdapterI::destroy() { - _node->getAdapter()->remove(_this->ice_getIdentity()); + try + { + _node->getAdapter()->remove(_this->ice_getIdentity()); + } + catch(const Ice::LocalException&) + { + // Ignore. + } } void |