Skip to content

Fix ZIO streamed request bodies hanging when sent in an uninterruptible region - #3073

Merged
adamw merged 2 commits into
masterfrom
fix-zio-multipart-hang-06c7e088
Nov 16, 2026
Merged

adamw merged 2 commits into
masterfrom
fix-zio-multipart-hang-06c7e088

Conversation

@adamw

@adamw adamw commented Nov 16, 2026

Copy link
Copy Markdown
Member

Fixes #3072.

Since #3056, HttpClientZioBackend and ArmeriaZioBackend send streamed request bodies (multipart included) through InterruptibleStreamPublisher. It captures the caller's runtime. If send runs in an uninterruptible region, the stream's fibers can't be interrupted. interruptWhen then waits forever for its promise-awaiting fiber when the stream ends, so the body never completes and the request hangs until the read timeout.

Fix: capture the runtime in an interruptible region. Added a test that sends a streamed body inside .uninterruptible.

🤖 Generated with Claude Code

@adamw
adamw merged commit 3a6d1ea into master Nov 16, 2026
27 checks passed
@adamw
adamw deleted the fix-zio-multipart-hang-06c7e088 branch November 16, 2026 08:57
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.

4.1.1: multipart requests on HttpClientZioBackend time out waiting for a response (regression from 4.1.0)

1 participant