trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] 04/08: [TS-4908] Remove duplicated cancelling event.
Date Fri, 14 Oct 2016 17:26:12 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit d57a10495dbd8a7796ca62b52b17f6eb46592c0b
Author: David Calavera <david.calavera@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 <david.calavera@gmail.com>
    (cherry picked from commit 3959a69a34a36180a81b0280700c6830720b4ad4)
---
 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 8eb35fb..d1fc00e 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -346,8 +346,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
@@ -356,8 +358,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" <commits@trafficserver.apache.org>.

Mime
View raw message