MCPcopy Create free account
hub / github.com/apache/trafficserver / release_stream

Method release_stream

src/proxy/http2/Http2ConnectionState.cc:2072–2110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2070}
2071
2072void
2073Http2ConnectionState::release_stream()
2074{
2075 REMEMBER(NO_EVENT, this->recursion)
2076
2077 SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
2078 if (this->session) {
2079 ink_assert(this->mutex == session->get_mutex());
2080
2081 if (total_peer_streams_count == 0) {
2082 if (fini_received) {
2083 session->do_clear_session_active();
2084
2085 // We were shutting down, go ahead and terminate the session
2086 // this is a member of Http2ConnectionState and will be freed
2087 // when session is destroyed
2088 session->get_proxy_session()->destroy();
2089
2090 // Can't do this because we just destroyed right here ^,
2091 // or we can use a local variable to do it.
2092 // session = nullptr;
2093 } else if (session->get_proxy_session()->is_active()) {
2094 // If the number of clients is 0, HTTP2_SESSION_EVENT_FINI is not received or sent, and session is active,
2095 // then mark the connection as inactive
2096 session->do_clear_session_active();
2097 session->set_no_activity_timeout();
2098 UnixNetVConnection *vc = static_cast<UnixNetVConnection *>(session->get_netvc());
2099 if (vc && vc->active_timeout_in == 0) {
2100 // With heavy traffic, session could be destroyed. Do not touch session after this.
2101 vc->add_to_keep_alive_queue();
2102 }
2103 } else {
2104 schedule_zombie_event();
2105 }
2106 } else if (fini_received) {
2107 schedule_zombie_event();
2108 }
2109 }
2110}
2111
2112void
2113Http2ConnectionState::update_initial_peer_rwnd(Http2WindowSize new_size)

Callers 2

~Http2StreamMethod · 0.80
do_io_closeMethod · 0.80

Calls 8

this_ethreadFunction · 0.85
destroyMethod · 0.45
get_proxy_sessionMethod · 0.45
is_activeMethod · 0.45
get_netvcMethod · 0.45

Tested by

no test coverage detected