summaryrefslogtreecommitdiffstats
path: root/src/timer_wheel_pq.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timer_wheel_pq.cpp')
-rwxr-xr-xsrc/timer_wheel_pq.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/timer_wheel_pq.cpp b/src/timer_wheel_pq.cpp
index 172d061e..bb480abd 100755
--- a/src/timer_wheel_pq.cpp
+++ b/src/timer_wheel_pq.cpp
@@ -169,11 +169,14 @@ bool CTimerWheel::handle(){
assert(timer->m_flow);
CFlowTimerHandle * flow =timer->m_flow;
m_st_handle++;
+
+ timer->m_flow=0;/* stop the timer */
+ flow->m_timer=0;
+
if ( flow->m_callback ){
flow->m_callback(flow);
}
- timer->m_flow=0;/* stop the timer */
- flow->m_timer=0;
+
m_pq.pop();
m_st_free++;
delete timer;