Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove incorrect assert in inactivity timeout handling #7012

Merged
merged 1 commit into from
Jul 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 12 additions & 4 deletions proxy/http/Http1ClientSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}

Expand Down Expand Up @@ -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
Expand Down