Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions proxy/http2/Http2Stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ Http2Stream::do_io_close(int /* flags */)
h2_proxy_ssn->connection_state.send_data_frames(this);
}

_clear_timers();
clear_io_events();

// Wait until transaction_done is called from HttpSM to signal that the TXN_CLOSE hook has been executed
Expand Down Expand Up @@ -430,6 +431,7 @@ Http2Stream::initiating_close()
// TXN_CLOSE has been sent
// _proxy_ssn = NULL;

_clear_timers();
clear_io_events();

// This should result in do_io_close or release being called. That will schedule the final
Expand Down Expand Up @@ -813,6 +815,7 @@ Http2Stream::destroy()
if (header_blocks) {
ats_free(header_blocks);
}
_clear_timers();
clear_io_events();
http_parser_clear(&http_parser);

Expand Down
8 changes: 8 additions & 0 deletions proxy/http2/Http2Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class Http2Stream : public ProxyTransaction
bool response_is_data_available() const;
Event *send_tracked_event(Event *event, int send_event, VIO *vio);
void send_response_body(bool call_update);
void _clear_timers();

/**
* Check if this thread is the right thread to process events for this
Expand Down Expand Up @@ -321,3 +322,10 @@ Http2Stream::read_vio_writer() const
{
return this->read_vio.get_writer();
}

inline void
Http2Stream::_clear_timers()
{
_timeout.cancel_active_timeout();
_timeout.cancel_inactive_timeout();
}