This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new 2b2d399 Reset Http1Transaction before adding vc to keep_alive_queue
(#7892)
2b2d399 is described below
commit 2b2d39936f839abcc630c4077cd294c8bfbd6124
Author: Masaori Koshiba <[email protected]>
AuthorDate: Wed Jun 2 07:33:02 2021 +0900
Reset Http1Transaction before adding vc to keep_alive_queue (#7892)
(cherry picked from commit 0f641cc94dc6c37bae9ee5e1faba326498095807)
---
proxy/http/Http1ClientSession.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/proxy/http/Http1ClientSession.cc b/proxy/http/Http1ClientSession.cc
index ca552ab..4b1111d 100644
--- a/proxy/http/Http1ClientSession.cc
+++ b/proxy/http/Http1ClientSession.cc
@@ -401,13 +401,14 @@ Http1ClientSession::release(ProxyTransaction *trans)
this->do_io_write(this, 0, nullptr);
}
+ h1trans->reset();
+
// Check to see there is remaining data in the
// buffer. If there is, spin up a new state
// machine to process it. Otherwise, issue an
// IO to wait for new data
bool more_to_read = this->_reader->is_read_avail_more_than(0);
if (more_to_read) {
- h1trans->reset();
HttpSsnDebug("[%" PRId64 "] data already in buffer, starting new
transaction", con_id);
new_transaction();
} else {
@@ -418,10 +419,11 @@ Http1ClientSession::release(ProxyTransaction *trans)
ink_assert(slave_ka_vio != ka_vio);
if (_vc) {
+ // Under heavy traffic ( - e.g. hitting
proxy.config.net.max_connections_in limit), calling add_to_keep_alive_queue()
+ // could free this _vc, session, and transaction.
_vc->cancel_active_timeout();
_vc->add_to_keep_alive_queue();
}
- h1trans->reset();
}
}