summaryrefslogtreecommitdiff
path: root/cpp/demo
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-04-18 08:47:38 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-04-18 08:47:38 +0000
commit29de5af8c250c086571f8a800a3a3d0e974e99c6 (patch)
tree29190ff52e42697b663ad379f1ebb495f21c42de /cpp/demo
parentminor updates. (diff)
downloadice-29de5af8c250c086571f8a800a3a3d0e974e99c6.tar.bz2
ice-29de5af8c250c086571f8a800a3a3d0e974e99c6.tar.xz
ice-29de5af8c250c086571f8a800a3a3d0e974e99c6.zip
fixes.
Diffstat (limited to 'cpp/demo')
-rw-r--r--cpp/demo/Ice/session/Session.ice2
-rwxr-xr-xcpp/demo/Ice/session/SessionFactoryI.cpp11
2 files changed, 11 insertions, 2 deletions
diff --git a/cpp/demo/Ice/session/Session.ice b/cpp/demo/Ice/session/Session.ice
index 118b15ccd00..32fbdd43a53 100644
--- a/cpp/demo/Ice/session/Session.ice
+++ b/cpp/demo/Ice/session/Session.ice
@@ -37,7 +37,7 @@ interface Session
* Refresh a session. If a session is not refreshed on a regular
* basis by the client it will be automatically destroyed.
**/
- void refresh();
+ idempotent void refresh();
/** Mark the session as destroyed. */
void destroy();
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