diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-18 23:38:16 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-18 23:38:16 +0000 |
commit | ac87a22f77e462240a114145cf63390a08665b2f (patch) | |
tree | 635fa1caa6c64c60a4ffdbfc9fd0c52eb14dfbdf /ace/Timer_Wheel_T.cpp | |
parent | d53666fe13320869faf5dd6f7e85042fde0daa52 (diff) | |
download | ATCD-ac87a22f77e462240a114145cf63390a08665b2f.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.cpp | 3 |
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 (); |