summaryrefslogtreecommitdiff
path: root/ace/Timer_Heap.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-03-17 18:32:04 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-03-17 18:32:04 +0000
commitd00fbf37ee62dc095c3d8d37d07cb0ddd8314c77 (patch)
treedbe490f400b11258321c4769832fb3d6ae9a2fed /ace/Timer_Heap.cpp
parentd6d3f2b9b07768273454cbb32986da1ccd249030 (diff)
downloadATCD-d00fbf37ee62dc095c3d8d37d07cb0ddd8314c77.tar.gz
foo
Diffstat (limited to 'ace/Timer_Heap.cpp')
-rw-r--r--ace/Timer_Heap.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/ace/Timer_Heap.cpp b/ace/Timer_Heap.cpp
index 059f9f8570b..60e23aeaba7 100644
--- a/ace/Timer_Heap.cpp
+++ b/ace/Timer_Heap.cpp
@@ -512,11 +512,14 @@ ACE_Timer_Heap::cancel (ACE_Event_Handler *handler)
if (this->heap_[i]->handler_ == handler)
{
ACE_Timer_Node *temp = this->remove (i);
- // Call the close hook.
- temp->handler_->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::TIMER_MASK);
- this->free_node (temp);
+
number_of_cancellations++;
+
+ if (number_of_cancellations == 1)
+ // Call the close hook.
+ temp->handler_->handle_close (ACE_INVALID_HANDLE,
+ ACE_Event_Handler::TIMER_MASK);
+ this->free_node (temp);
}
else
i++;