summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/sys')
-rw-r--r--cpp/src/qpid/sys/Timer.cpp13
1 files changed, 8 insertions, 5 deletions
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());