Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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