From 35aa746da456e4a18187bc9b09020530f494293d Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Tue, 22 May 2018 13:48:11 -0500 Subject: [PATCH] Call initiating_close and delay delete_stream --- proxy/http2/Http2ConnectionState.cc | 6 +++--- proxy/http2/Http2Stream.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 4191a90ffcb..cd89c14fcfb 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1128,7 +1128,7 @@ Http2ConnectionState::cleanup_streams() if (this->tx_error_code.cls != ProxyErrorClass::NONE) { s->set_tx_error_code(this->tx_error_code); } - this->delete_stream(s); + s->initiating_close(); ink_assert(s != next); s = next; } @@ -1182,8 +1182,8 @@ Http2ConnectionState::delete_stream(Http2Stream *stream) ink_assert(client_streams_out_count > 0); --client_streams_out_count; } - // total_client_streams_count will be decremented in release_stream(), because it's a counter include streams in the process of - // shutting down. + // total_client_streams_count will be decremented in release_stream(), because that counter is used to determine + // whether it is safe to destroy the Session stream->initiating_close(); diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index 9232ed8b388..80540f8ab84 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -438,7 +438,7 @@ Http2Stream::initiating_close() } else if (!sent_write_complete) { // Transaction is already gone or not started. Kill yourself do_io_close(); - destroy(); + transaction_done(); // Mark that it is safe to kill the stream } } }