diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-09-26 14:04:54 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-09-26 14:04:54 +0200 |
commit | a3c9dfeead519e87ba197e5e66b1013f39fa4366 (patch) | |
tree | a1bb69cdea16ca854173a2e3241b242aacf1b14e /cpp/src/IceGrid/SessionManager.h | |
parent | Fixed locator potential hang when resolving round-robin replica group which c... (diff) | |
download | ice-a3c9dfeead519e87ba197e5e66b1013f39fa4366.tar.bz2 ice-a3c9dfeead519e87ba197e5e66b1013f39fa4366.tar.xz ice-a3c9dfeead519e87ba197e5e66b1013f39fa4366.zip |
IceGrid fixes to ensure the registry/node don't wait too long if a replica becomes unreachable
Diffstat (limited to 'cpp/src/IceGrid/SessionManager.h')
-rw-r--r-- | cpp/src/IceGrid/SessionManager.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/SessionManager.h b/cpp/src/IceGrid/SessionManager.h index 7760241e865..c598eadc2cd 100644 --- a/cpp/src/IceGrid/SessionManager.h +++ b/cpp/src/IceGrid/SessionManager.h @@ -189,7 +189,7 @@ public: } virtual void - tryCreateSession(bool waitForTry = true) + tryCreateSession(bool waitForTry = true, const IceUtil::Time& timeout = IceUtil::Time()) { { Lock sync(*this); @@ -215,7 +215,17 @@ public: // Wait until the action is executed and the state changes. while(_nextAction == Connect || _nextAction == KeepAlive || _state == InProgress) { - wait(); + if(timeout == IceUtil::Time()) + { + wait(); + } + else + { + if(!timedWait(timeout)) + { + break; + } + } } } } |