trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wei...@apache.org
Subject git commit: TS-1488 Check the event`s cancel flag before put it into the PriorityEventQueue
Date Wed, 26 Sep 2012 05:52:04 GMT
Updated Branches:
  refs/heads/master be7e974c2 -> 6fb81ae94


TS-1488 Check the event`s cancel flag before put it into the PriorityEventQueue


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6fb81ae9
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6fb81ae9
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6fb81ae9

Branch: refs/heads/master
Commit: 6fb81ae94a218dd54b99ddcdb40b1883efe247fd
Parents: be7e974
Author: weijin <weijin@apache.org>
Authored: Wed Sep 26 13:51:16 2012 +0800
Committer: weijin <weijin@apache.org>
Committed: Wed Sep 26 13:51:16 2012 +0800

----------------------------------------------------------------------
 CHANGES                           |    3 +++
 iocore/eventsystem/UnixEThread.cc |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6fb81ae9/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 6b5145c..b989ad6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.3.1
 
+  *) [TS-1488] Check the event`s cancel flag before put it into the PriorityEventQueue.
+     Author: KuoTai.
+
   *) [TS-1484] Fix SNI crashes where there is no default certificate
 
   *) [TS-1473] Fix header_filter plugin for ARM.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6fb81ae9/iocore/eventsystem/UnixEThread.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/UnixEThread.cc b/iocore/eventsystem/UnixEThread.cc
index 71cbcab..462f86a 100644
--- a/iocore/eventsystem/UnixEThread.cc
+++ b/iocore/eventsystem/UnixEThread.cc
@@ -186,7 +186,9 @@ EThread::execute() {
         // already been dequeued
         cur_time = ink_get_based_hrtime_internal();
         while ((e = EventQueueExternal.dequeue_local())) {
-          if (!e->timeout_at) { // IMMEDIATE
+          if (e->cancelled)
+             free_event(e);
+          else if (!e->timeout_at) { // IMMEDIATE
             ink_assert(e->period == 0);
             process_event(e, e->callback_event);
           } else if (e->timeout_at > 0) // INTERVAL


Mime
View raw message