summaryrefslogtreecommitdiff
path: root/ace/Timer_Wheel_T.cpp
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-06-19 20:24:03 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-06-19 20:24:03 +0000
commit3742b3aa67e84267b7a2f29152d7f7b2b7efcaf1 (patch)
tree057f3a539ffe70ad485e40470d83354f9c0e1c8a /ace/Timer_Wheel_T.cpp
parent814fd9b318e203420d82e4d5b0cb112a41df2396 (diff)
downloadATCD-3742b3aa67e84267b7a2f29152d7f7b2b7efcaf1.tar.gz
Fix for Timer Wheel
Diffstat (limited to 'ace/Timer_Wheel_T.cpp')
-rw-r--r--ace/Timer_Wheel_T.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/ace/Timer_Wheel_T.cpp b/ace/Timer_Wheel_T.cpp
index 001cafb226e..8299ff17f8e 100644
--- a/ace/Timer_Wheel_T.cpp
+++ b/ace/Timer_Wheel_T.cpp
@@ -520,20 +520,21 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, LOCK>::expire (const ACE_Time_Value &cur_time)
do
{
next_earliest_time = cur_time;
+ next_earliest = this->wheel_size_;
// Find 2nd earliest position
for (i = 0; i < this->wheel_size_; i++)
{
if (i != earliest
&& this->wheel_[i]->get_next () != this->wheel_[i]
- && this->wheel_[i]->get_next ()->get_timer_value () < next_earliest_time)
+ && this->wheel_[i]->get_next ()->get_timer_value () <= next_earliest_time)
{
next_earliest = i;
next_earliest_time = this->wheel_[i]->get_next ()->get_timer_value ();
}
}
- while (this->wheel_[earliest]->get_next ()->get_timer_value () < next_earliest_time)
+ while (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 ();
@@ -573,7 +574,7 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, LOCK>::expire (const ACE_Time_Value &cur_time)
break;
}
- if (next_earliest_time == cur_time)
+ if (next_earliest_time == this->wheel_size_)
break;
earliest = next_earliest;