* HttpSM has called TXN_close hooks. */
| 590 | * HttpSM has called TXN_close hooks. |
| 591 | */ |
| 592 | void |
| 593 | Http2Stream::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 | |
| 618 | void |
| 619 | Http2Stream::terminate_if_possible() |
no test coverage detected