You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2016/10/11 22:15:47 UTC

[trafficserver] branch master updated: [TS-4908] Remove duplicated cancelling event.

This is an automated email from the ASF dual-hosted git repository.

shinrich pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  3959a69   [TS-4908] Remove duplicated cancelling event.
3959a69 is described below

commit 3959a69a34a36180a81b0280700c6830720b4ad4
Author: David Calavera <da...@gmail.com>
AuthorDate: Wed Sep 28 17:52:43 2016 -0700

    [TS-4908] Remove duplicated cancelling event.
    
    The HTTP2Stream is cancells the event twice when the transaction
    is done. In debug mode, this causes an assertion error because it tries to cancel an already cancelled event:
    
    https://github.com/apache/trafficserver/blob/master/iocore/eventsystem/I_Action.h#L137
    
    Signed-off-by: David Calavera <da...@gmail.com>
---
 proxy/http2/Http2Stream.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index 1750b04..8b80d1b 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -344,8 +344,10 @@ void
 Http2Stream::transaction_done()
 {
   SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
-  if (cross_thread_event != NULL)
+  if (cross_thread_event) {
     cross_thread_event->cancel();
+    cross_thread_event = NULL;
+  }
 
   if (!closed)
     do_io_close(); // Make sure we've been closed.  If we didn't close the parent session better still be open
@@ -354,8 +356,7 @@ Http2Stream::transaction_done()
 
   if (closed) {
     // Safe to initiate SSN_CLOSE if this is the last stream
-    if (cross_thread_event)
-      cross_thread_event->cancel();
+    ink_assert(cross_thread_event == NULL);
     // Schedule the destroy to occur after we unwind here.  IF we call directly, may delete with reference on the stack.
     cross_thread_event = this->get_thread()->schedule_imm(this, VC_EVENT_EOS, NULL);
   }

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].