shinrich commented on a change in pull request #6889:
URL: https://github.com/apache/trafficserver/pull/6889#discussion_r452254877
##########
File path: proxy/http/Http1ClientSession.cc
##########
@@ -264,28 +255,22 @@ Http1ClientSession::do_io_close(int alerrno)
_reader->consume(_reader->read_avail());
} else {
read_state = HCS_CLOSED;
- SET_HANDLER(&Http1ClientSession::state_wait_for_sm_shutdown);
- ka_vio = _vc->do_io_read(this, INT64_MAX, read_buffer);
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);
conn_decrease = false;
+ // Can go ahead and close the netvc now, but keeping around the session
object
+ // until all the transactions are closed
+ if (_vc) {
+ _vc->do_io_close();
+ _vc = nullptr;
+ }
}
if (transact_count == released_transactions) {
this->destroy();
}
}
-int
-Http1ClientSession::state_wait_for_sm_shutdown(int event, void *data)
Review comment:
Yes, the changes in this PR moved the netvc close back to the
Http1ClientSession::do_io_close(). So with that change, we didn't need the
extra handler added in #6809 to track the netvc object between the time it got
a terminal event and we freed the Http1ClientSession.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]