Skip to content

fix(mint): drop queued chunks when cancelling requests - #595

Open
arrangabriel wants to merge 1 commit into
elixir-grpc:masterfrom
arrangabriel:drop-chunks-for-stale-requests
Open

arrangabriel wants to merge 1 commit into
elixir-grpc:masterfrom
arrangabriel:drop-chunks-for-stale-requests

Conversation

@arrangabriel

Copy link
Copy Markdown
Contributor

Drop queued body chunks when a request's stream ends

process_response/2 pops a finished request's ref from state.requests, and Mint drops it from the conn struct, but remaining chunks are still present in request_stream_queue.
handle_continue(:process_request_stream_queue, ...) then drains the queue and calls Mint.HTTP2.get_window_size/2 on the stale ref, which raises and kills the connection process.

Fixes #594

Changes

  • drop_request/2 pairs State.pop_ref/2 with drop_queued_request_chunks/2, and it is now called every time a single request is dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connection process crashes on a queued body chunk for a canceled request

1 participant