Skip to content
Merged
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions library/common/http/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,16 @@ void Client::cancelStream(envoy_stream_t stream) {
ScopeTrackerScopeState scope(direct_stream.get(), scopeTracker());
removeStream(direct_stream->stream_handle_);

direct_stream->callbacks_->onCancel();

// Since https://github.com/envoyproxy/envoy/pull/13052, the connection manager expects that
// response code details are set on all possible paths for streams.
direct_stream->setResponseDetails(getCancelDetails());

// Only run the reset callback if the stream is still open.
if (stream_was_open) {
ENVOY_LOG(debug, "[S{}] application cancelled stream", stream);

direct_stream->callbacks_->onCancel();
Comment thread
goaway marked this conversation as resolved.
Outdated

// The runResetCallbacks call synchronously causes Envoy to defer delete the HCM's
// ActiveStream. We have some concern that this could potentially race a terminal callback
// scheduled on the same iteration of the event loop. If we see violations in the callback
Expand Down