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

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


The following commit(s) were added to refs/heads/7.1.x by this push:
     new 6f34493  Fix another ProxySession and NetVC shutdown race crash
6f34493 is described below

commit 6f3449356a2fe8e47e970598490e1c3d8b7cf35a
Author: Susan Hinrichs <shinr...@apache.org>
AuthorDate: Thu Aug 30 16:34:59 2018 +0000

    Fix another ProxySession and NetVC shutdown race crash
    
    (cherry picked from commit b15b63efd8c08c71e303780de6436eac2757cddf)
---
 proxy/ProxyClientSession.cc      | 4 ----
 proxy/http/Http1ClientSession.cc | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/proxy/ProxyClientSession.cc b/proxy/ProxyClientSession.cc
index a240639..434ca4e 100644
--- a/proxy/ProxyClientSession.cc
+++ b/proxy/ProxyClientSession.cc
@@ -205,10 +205,6 @@ ProxyClientSession::handle_api_return(int event)
     }
     break;
   case TS_HTTP_SSN_CLOSE_HOOK: {
-    NetVConnection *vc = this->get_netvc();
-    if (vc) {
-      vc->do_io_close();
-    }
     free(); // You can now clean things up
     break;
   }
diff --git a/proxy/http/Http1ClientSession.cc b/proxy/http/Http1ClientSession.cc
index 04bfa35..59a3cd1 100644
--- a/proxy/http/Http1ClientSession.cc
+++ b/proxy/http/Http1ClientSession.cc
@@ -136,6 +136,11 @@ Http1ClientSession::free()
   // Free the transaction resources
   this->trans.super::destroy();
 
+  if (client_vc) {
+    client_vc->do_io_close();
+    client_vc = nullptr;
+  }
+
   super::free();
   THREAD_FREE(this, http1ClientSessionAllocator, this_thread());
 }

Reply via email to