From 2c28542e5f7cf25f717032ebc2c64041059831b2 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Thu, 30 Aug 2018 16:34:59 +0000 Subject: [PATCH] Fix another ProxySession and NetVC shutdown race crash --- 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 c4fba5bfef5..42f4f3bb1c1 100644 --- a/proxy/ProxyClientSession.cc +++ b/proxy/ProxyClientSession.cc @@ -198,10 +198,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 31ed45dec0a..4865886a2c7 100644 --- a/proxy/http/Http1ClientSession.cc +++ b/proxy/http/Http1ClientSession.cc @@ -135,6 +135,11 @@ Http1ClientSession::free() // Free the transaction resources this->trans.super_type::destroy(); + if (client_vc) { + client_vc->do_io_close(); + client_vc = nullptr; + } + super::free(); THREAD_FREE(this, http1ClientSessionAllocator, this_thread()); }