summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2011-06-15 19:18:48 +0200
committerJose <jose@zeroc.com>2011-06-15 19:18:48 +0200
commit4ce44bf1eff2891a1b18e447b00197436fed11a1 (patch)
tree97d9bf6e4e0bc3103bfa68a0fe8e5b0fd4b1ed5d /cpp/src
parentupdate installer removeaddins action (diff)
downloadice-4ce44bf1eff2891a1b18e447b00197436fed11a1.tar.bz2
ice-4ce44bf1eff2891a1b18e447b00197436fed11a1.tar.xz
ice-4ce44bf1eff2891a1b18e447b00197436fed11a1.zip
5152 - IceStorm/repgrid assertion
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceStorm/NodeI.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/IceStorm/NodeI.cpp b/cpp/src/IceStorm/NodeI.cpp
index 695baac0b34..0c9511e1dfa 100644
--- a/cpp/src/IceStorm/NodeI.cpp
+++ b/cpp/src/IceStorm/NodeI.cpp
@@ -203,6 +203,13 @@ NodeI::start()
// By setting _checkTask first we stop recovery() from setting it
// to the regular election interval.
//
+
+ //
+ // We use this lock to ensure that recovery is called before CheckTask
+ // is scheduled, even if timeout is 0
+ //
+ Lock sync(*this);
+
_checkTask = new CheckTask(this);
_timer->schedule(_checkTask, IceUtil::Time::seconds((_nodes.size() - _id) * 2));
recovery();