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

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

commit 13c267df80e653e9ba490df37b4527d18de98db4
Author: Bryan Call <[email protected]>
AuthorDate: Tue Jul 10 17:30:28 2018 -0700

    Fixed http/2 issue with Http2Stream being updated after it was destroyed
    
    (cherry picked from commit e57679c565effcc066945d19e99314cb6a3b7724)
---
 proxy/http2/Http2Stream.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index 85453e2..672b553 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -679,6 +679,7 @@ void
 Http2Stream::send_response_body(bool call_update)
 {
   Http2ClientSession *parent = static_cast<Http2ClientSession 
*>(this->get_parent());
+  inactive_timeout_at        = Thread::get_hrtime() + inactive_timeout;
 
   if (Http2::stream_priority_enabled) {
     SCOPED_MUTEX_LOCK(lock, parent->connection_state.mutex, this_ethread());
@@ -689,8 +690,9 @@ Http2Stream::send_response_body(bool call_update)
     SCOPED_MUTEX_LOCK(lock, parent->connection_state.mutex, this_ethread());
     parent->connection_state.send_data_frames(this);
     this->signal_write_event(call_update);
+    // XXX The call to signal_write_event can destroy/free the Http2Stream.
+    // Don't modify the Http2Stream after calling this method.
   }
-  inactive_timeout_at = Thread::get_hrtime() + inactive_timeout;
 }
 
 void

Reply via email to