Skip to content

Commit 9a8f868

Browse files
authored
Disable read/write_vio in Http2Stream::transaction_done (#12367)
1 parent 27478a7 commit 9a8f868

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/proxy/http2/Http2Stream.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,11 @@ Http2Stream::transaction_done()
599599
}
600600
Http2ConnectionState &state = this->get_connection_state();
601601
ink_release_assert(closed || !state.is_state_closed());
602+
603+
// HttpSM is gone, no more reading or writing
602604
_sm = nullptr;
605+
read_vio.disable();
606+
write_vio.disable();
603607

604608
if (closed) {
605609
// Safe to initiate SSN_CLOSE if this is the last stream
@@ -901,8 +905,8 @@ Http2Stream::update_write_request(bool call_update)
901905
void
902906
Http2Stream::signal_read_event(int event)
903907
{
904-
if (this->read_vio.cont == nullptr || this->read_vio.cont->mutex == nullptr || this->read_vio.op == VIO::NONE ||
905-
this->terminate_stream) {
908+
if (this->_sm == nullptr || this->read_vio.cont == nullptr || this->read_vio.cont->mutex == nullptr ||
909+
this->read_vio.op == VIO::NONE || this->terminate_stream) {
906910
return;
907911
}
908912

@@ -930,8 +934,8 @@ void
930934
Http2Stream::signal_write_event(int event, bool call_update)
931935
{
932936
// Don't signal a write event if in fact nothing was written
933-
if (this->write_vio.cont == nullptr || this->write_vio.cont->mutex == nullptr || this->write_vio.op == VIO::NONE ||
934-
this->terminate_stream) {
937+
if (this->_sm == nullptr || this->write_vio.cont == nullptr || this->write_vio.cont->mutex == nullptr ||
938+
this->write_vio.op == VIO::NONE || this->terminate_stream) {
935939
return;
936940
}
937941

0 commit comments

Comments
 (0)