diff options
Diffstat (limited to 'cpp/demo/Ice/session/SessionFactoryI.cpp')
-rwxr-xr-x | cpp/demo/Ice/session/SessionFactoryI.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/demo/Ice/session/SessionFactoryI.cpp b/cpp/demo/Ice/session/SessionFactoryI.cpp index a6dcb48f2f4..55e3924ee79 100755 --- a/cpp/demo/Ice/session/SessionFactoryI.cpp +++ b/cpp/demo/Ice/session/SessionFactoryI.cpp @@ -92,7 +92,16 @@ SessionFactoryI::reap() if(p->session->destroyed()) { p->session->destroyCallback(); - _adapter->remove(p->id); + try + { + _adapter->remove(p->id); + } + catch(const Ice::ObjectAdapterDeactivatedException&) + { + // This method can be called while the server is + // shutting down, in which case this exception is + // expected. + } p = _sessions.erase(p); } else |