summaryrefslogtreecommitdiff
path: root/ace/Timer_Wheel_T.cpp
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-06-24 19:42:49 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-06-24 19:42:49 +0000
commit6801ef795283d7f41cb1ea3d9ef5526c3d43db75 (patch)
tree9c179587c81057ba011670753d92d69cc238186a /ace/Timer_Wheel_T.cpp
parent00a8b017a7d2ac075da414d426f1edf13ecae1d2 (diff)
downloadATCD-6801ef795283d7f41cb1ea3d9ef5526c3d43db75.tar.gz
Changed cancel (type..) to call cancellation() even if there are no timers
to cancel. This causes the correct behavior of calling handle_close () during expire when handle_timeout() returns -1.
Diffstat (limited to 'ace/Timer_Wheel_T.cpp')
-rw-r--r--ace/Timer_Wheel_T.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/ace/Timer_Wheel_T.cpp b/ace/Timer_Wheel_T.cpp
index 8299ff17f8e..45a6c7375b6 100644
--- a/ace/Timer_Wheel_T.cpp
+++ b/ace/Timer_Wheel_T.cpp
@@ -272,10 +272,6 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, LOCK>::cancel (const TYPE &type,
// Cancel it and remove it.
number_of_cancellations++;
- if (dont_call_handle_close == 0
- && number_of_cancellations == 1)
- this->upcall_functor ().cancellation (*this, curr->get_type ());
-
// Detach it from the list
ACE_Timer_Node_T<TYPE> *tempnode = curr;
curr->get_prev ()->set_next (curr->get_next ());
@@ -311,7 +307,10 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, LOCK>::cancel (const TYPE &type,
}
}
}
-
+
+ if (dont_call_handle_close == 0)
+ this->upcall_functor ().cancellation (*this, type);
+
return number_of_cancellations;
}