summaryrefslogtreecommitdiff
path: root/ace/Timer_Wheel_T.cpp
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-18 23:38:16 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-18 23:38:16 +0000
commit73b02837e935e621722876fb962ef628a5366471 (patch)
tree635fa1caa6c64c60a4ffdbfc9fd0c52eb14dfbdf /ace/Timer_Wheel_T.cpp
parent08c2d124a9e5a1411586bf3483c7954f39f79ca3 (diff)
downloadATCD-73b02837e935e621722876fb962ef628a5366471.tar.gz
Fixed a problem with Timer Wheel's expire(). The problem occured when the
handle_timeout() method of the event handler used would return a 0. This causes the Timer Queue to cancel all timers using that event handler. Because Timer Wheel's expire caches the position of some timers that will be expired, it was trying to expire timers that were already cancelled. Now it checks the timer before it expires.
Diffstat (limited to 'ace/Timer_Wheel_T.cpp')
-rw-r--r--ace/Timer_Wheel_T.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ace/Timer_Wheel_T.cpp b/ace/Timer_Wheel_T.cpp
index 099660e3e09..f52425ef40b 100644
--- a/ace/Timer_Wheel_T.cpp
+++ b/ace/Timer_Wheel_T.cpp
@@ -560,7 +560,8 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::expire (const ACE_Time_Value &cur_ti
}
}
- while (this->wheel_[earliest]->get_next ()->get_timer_value () <= next_earliest_time)
+ while (this->wheel_[earliest]->get_next () != this->wheel_[earliest]
+ && this->wheel_[earliest]->get_next ()->get_timer_value () <= next_earliest_time)
{
// Remove the first node in the earliest position
ACE_Timer_Node_T<TYPE> *expired = this->wheel_[earliest]->get_next ();