This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new beab154 Remove incorrect assert in inactivity timeout handling (#7012)
beab154 is described below
commit beab1548b8f274145738ffc9cf88d191504ce9bf
Author: Sudheer Vinukonda <[email protected]>
AuthorDate: Fri Jul 17 07:05:18 2020 -0700
Remove incorrect assert in inactivity timeout handling (#7012)
Also fix duplicate decrement of current client connection metric
(cherry picked from commit 41370296d76ba13ef5de65eb4ed9d0fbeeb6f673)
---
proxy/http/Http1ClientSession.cc | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/proxy/http/Http1ClientSession.cc b/proxy/http/Http1ClientSession.cc
index 9ddd708..2005be4 100644
--- a/proxy/http/Http1ClientSession.cc
+++ b/proxy/http/Http1ClientSession.cc
@@ -88,8 +88,13 @@ Http1ClientSession::release_transaction()
released_transactions++;
if (transact_count == released_transactions) {
// Make sure we previously called release() or do_io_close() on the session
- ink_release_assert(read_state != HCS_ACTIVE_READER && read_state !=
HCS_INIT);
- destroy();
+ ink_release_assert(read_state != HCS_INIT);
+ if (read_state == HCS_ACTIVE_READER) {
+ // (in)active timeout
+ do_io_close(HTTP_ERRNO);
+ } else {
+ destroy();
+ }
}
}
@@ -254,10 +259,13 @@ Http1ClientSession::do_io_close(int alerrno)
// READ_READY event.
_reader->consume(_reader->read_avail());
} else {
- read_state = HCS_CLOSED;
HttpSsnDebug("[%" PRId64 "] session closed", con_id);
HTTP_SUM_DYN_STAT(http_transactions_per_client_con, transact_count);
- HTTP_DECREMENT_DYN_STAT(http_current_client_connections_stat);
+ if (read_state != HCS_ACTIVE_READER) {
+ // donot double decrement
+ HTTP_DECREMENT_DYN_STAT(http_current_client_connections_stat);
+ }
+ read_state = HCS_CLOSED;
conn_decrease = false;
// Can go ahead and close the netvc now, but keeping around the session
object
// until all the transactions are closed