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

[trafficserver] branch master updated: Make Http2ClientSession inactive on EOS event

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

masaori pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new e9c3a13  Make Http2ClientSession inactive on EOS event
e9c3a13 is described below

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

    Make Http2ClientSession inactive on EOS event
---
 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 361f2f8..638679f 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -103,6 +103,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 8966c73..d2a1cc2 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1406,6 +1406,8 @@ Http2ConnectionState::release_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