summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/SessionManager.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-12-04 19:43:10 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-12-04 19:43:10 +0000
commit996be326b98f2c5bb776ba68dd2b3d8b2861a12a (patch)
tree446bb318a97f7e64b35f299407f03868942c7c0f /cpp/src/IceGrid/SessionManager.h
parentRemoved -single_module, it doesn't seem to be neccessary anymore (diff)
downloadice-996be326b98f2c5bb776ba68dd2b3d8b2861a12a.tar.bz2
ice-996be326b98f2c5bb776ba68dd2b3d8b2861a12a.tar.xz
ice-996be326b98f2c5bb776ba68dd2b3d8b2861a12a.zip
More cleanup
Diffstat (limited to 'cpp/src/IceGrid/SessionManager.h')
-rw-r--r--cpp/src/IceGrid/SessionManager.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/SessionManager.h b/cpp/src/IceGrid/SessionManager.h
index 7d659d593ea..84dafe96310 100644
--- a/cpp/src/IceGrid/SessionManager.h
+++ b/cpp/src/IceGrid/SessionManager.h
@@ -54,7 +54,7 @@ public:
{
TPrx session;
InternalRegistryPrx registry;
- IceUtil::Time timeout = IceUtil::Time::seconds(10);
+ IceUtil::Time timeout = IceUtil::Time::seconds(15);
Action action = Connect;
while(true)
@@ -215,6 +215,21 @@ public:
notifyAll();
}
+ bool
+ terminateIfDisconnected()
+ {
+ Lock sync(*this);
+ if(_state != Disconnected)
+ {
+ return false; // Nothing we can do for now.
+ }
+ assert(_state != Destroyed);
+ _state = Destroyed;
+ _nextAction = None;
+ notifyAll();
+ return true;
+ }
+
void
terminate(bool destroySession = true)
{