You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/06/01 23:08:45 UTC

[trafficserver] branch 9.0.x updated: Clear handling tracked events of Http2Stream

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

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 92f01eb  Clear handling tracked events of Http2Stream
92f01eb is described below

commit 92f01ebeb1819c58a8e100f2716824fd48dc97f2
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue May 26 15:43:02 2020 +0900

    Clear handling tracked events of Http2Stream
    
    (cherry picked from commit 0b92e7cc3a6df779c4d527e0915adfb7ed936487)
---
 proxy/http2/Http2Stream.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index 3413532..cc40865 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -75,9 +75,11 @@ Http2Stream::main_event_handler(int event, void *edata)
   Event *e = static_cast<Event *>(edata);
   reentrancy_count++;
   if (e == _read_vio_event) {
+    _read_vio_event = nullptr;
     this->signal_read_event(e->callback_event);
     return 0;
   } else if (e == _write_vio_event) {
+    _write_vio_event = nullptr;
     this->signal_write_event(e->callback_event);
     return 0;
   } else if (e == cross_thread_event) {
@@ -899,12 +901,13 @@ Http2Stream::clear_io_events()
 {
   if (read_event) {
     read_event->cancel();
+    read_event = nullptr;
   }
-  read_event = nullptr;
+
   if (write_event) {
     write_event->cancel();
+    write_event = nullptr;
   }
-  write_event = nullptr;
 
   if (buffer_full_write_event) {
     buffer_full_write_event->cancel();