summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/cluster/Cluster.cpp1
-rw-r--r--cpp/src/qpid/sys/Timer.cpp13
2 files changed, 8 insertions, 6 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp
index df0e612af7..5da1579cb7 100644
--- a/cpp/src/qpid/cluster/Cluster.cpp
+++ b/cpp/src/qpid/cluster/Cluster.cpp
@@ -1126,7 +1126,6 @@ void Cluster::timerDrop(const MemberId& , const std::string& name, Lock&) {
}
bool Cluster::isElder() const {
- Monitor::ScopedLock l(lock);
return elder;
}
diff --git a/cpp/src/qpid/sys/Timer.cpp b/cpp/src/qpid/sys/Timer.cpp
index 3b627687de..76e8b3dc0b 100644
--- a/cpp/src/qpid/sys/Timer.cpp
+++ b/cpp/src/qpid/sys/Timer.cpp
@@ -107,16 +107,19 @@ void Timer::run()
{
ScopedLock<Mutex> l(t->callbackLock);
if (t->cancelled) {
- drop(t);
+ {
+ Monitor::ScopedUnlock u(monitor);
+ drop(t);
+ }
if (delay > lateCancel) {
- QPID_LOG(debug, t->name << " cancelled timer woken up " << delay / TIME_MSEC
- << "ms late");
+ QPID_LOG(debug, t->name << " cancelled timer woken up " <<
+ delay / TIME_MSEC << "ms late");
}
continue;
} else if(Duration(t->nextFireTime, start) >= 0) {
{
- Monitor::ScopedUnlock u(monitor);
- fire(t);
+ Monitor::ScopedUnlock u(monitor);
+ fire(t);
}
// Warn if callback overran next timer's start.
AbsTime end(AbsTime::now());