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

Method transaction_done

src/proxy/http2/Http2Stream.cc:592–616  ·  view source on GitHub ↗

* HttpSM has called TXN_close hooks. */

Source from the content-addressed store, hash-verified

590 * HttpSM has called TXN_close hooks.
591 */
592void
593Http2Stream::transaction_done()
594{
595 SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
596 super::transaction_done();
597
598 if (!closed && _state == Http2StreamState::HTTP2_STREAM_STATE_CLOSED) {
599 do_io_close(); // Make sure we've been closed. If we didn't close the _proxy_ssn session better still be open
600 }
601 Http2ConnectionState &state = this->get_connection_state();
602 ink_release_assert(closed || !state.is_state_closed());
603
604 // HttpSM is gone, no more reading or writing
605 _sm = nullptr;
606 read_vio.disable();
607 write_vio.disable();
608
609 if (closed) {
610 // Safe to initiate SSN_CLOSE if this is the last stream
611 ink_assert(cross_thread_event == nullptr);
612 // Schedule the destroy to occur after we unwind here. IF we call directly, may delete with reference on the stack.
613 terminate_stream = true;
614 terminate_if_possible();
615 }
616}
617
618void
619Http2Stream::terminate_if_possible()

Callers 2

do_http_server_openMethod · 0.45
kill_thisMethod · 0.45

Calls 3

this_ethreadFunction · 0.85
is_state_closedMethod · 0.80
disableMethod · 0.45

Tested by

no test coverage detected