Skip to content

client: use inactivity timeout for status stream shutdown#6396

Merged
tonistiigi merged 1 commit intomoby:masterfrom
silvin-lubecki:fix-status-timeout-cancellation
Dec 5, 2025
Merged

client: use inactivity timeout for status stream shutdown#6396
tonistiigi merged 1 commit intomoby:masterfrom
silvin-lubecki:fix-status-timeout-cancellation

Conversation

@silvin-lubecki
Copy link
Contributor

Instead of using a fixed 3-second timeout after solve completion, use an inactivity-based timeout that waits 5 seconds since the last received status message. This prevents premature stream closure when status messages are still being delivered through slow connections (e.g., proxied environments).

Also ignore context.Canceled errors in the status goroutine to avoid failing builds when the inactivity timeout triggers - the build itself succeeded, we just may have missed some final status messages.

Instead of using a fixed 3-second timeout after solve completion,
use an inactivity-based timeout that waits 5 seconds since the last
received status message. This prevents premature stream closure when
status messages are still being delivered through slow connections
(e.g., proxied environments).

Also ignore context.Canceled errors in the status goroutine to avoid
failing builds when the inactivity timeout triggers - the build itself
succeeded, we just may have missed some final status messages.

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
@silvin-lubecki silvin-lubecki force-pushed the fix-status-timeout-cancellation branch from b61b2ae to 961bf27 Compare December 5, 2025 16:01
@tonistiigi tonistiigi merged commit 06fc06b into moby:master Dec 5, 2025
140 checks passed
@crazy-max crazy-max added this to the v0.27.0 milestone Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants