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/16 21:40:00 UTC

[trafficserver] branch 8.1.x updated: Make Http2ClientSession inactive on EOS event

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

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


The following commit(s) were added to refs/heads/8.1.x by this push:
     new 7d24eef  Make Http2ClientSession inactive on EOS event
7d24eef is described below

commit 7d24eef07e62263584837ea589caebefd6e38ebb
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Jun 9 16:04:16 2020 +0900

    Make Http2ClientSession inactive on EOS event
    
    (cherry picked from commit e9c3a136bfd5b06178c22b095263eb34673eb657)
---
 proxy/http2/Http2ClientSession.cc   | 3 +++
 proxy/http2/Http2ConnectionState.cc | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc
index f575ff3..6d7d3de 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -107,6 +107,9 @@ Http2ClientSession::free()
   REMEMBER(NO_EVENT, this->recursion)
   Http2SsnDebug("session free");
 
+  // Don't free active ProxySession
+  ink_release_assert(is_active() == false);
+
   this->_milestones.mark(Http2SsnMilestone::CLOSE);
   ink_hrtime total_time = this->_milestones.elapsed(Http2SsnMilestone::OPEN, Http2SsnMilestone::CLOSE);
 
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 703feb6..394b299 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1383,6 +1383,8 @@ Http2ConnectionState::release_stream(Http2Stream *stream)
 
     if (total_client_streams_count == 0) {
       if (fini_received) {
+        ua_session->clear_session_active();
+
         // We were shutting down, go ahead and terminate the session
         // this is a member of Http2ConnectionState and will be freed
         // when ua_session is destroyed