Skip to content

Close the ttyWriter done channel after context cancel - #14115

Open
Hashim1999164 wants to merge 1 commit into
docker:mainfrom
Hashim1999164:fix/tty-done-after-context-cancel
Open

Close the ttyWriter done channel after context cancel#14115
Hashim1999164 wants to merge 1 commit into
docker:mainfrom
Hashim1999164:fix/tty-done-after-context-cancel

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 22, 2026

Copy link
Copy Markdown

Summary

Fixes #14114

ttyWriter.Done sent on an unbuffered channel. After SIGTERM the render goroutine exits through ctx.Done() and never receives, so Done blocked forever. Closing the channel returns immediately even when that goroutine is already gone.

Test plan

  • go test ./cmd/display/
  • TestDoneAfterContextCancelDoesNotHang covers cancel then Done

Signed-off-by: Hashim1999164 <64767361+Hashim1999164@users.noreply.github.com>
@Hashim1999164
Hashim1999164 requested review from a team as code owners August 22, 2026 18:17
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.

[BUG] ttyWriter.Done still hangs forever when the context was canceled before Done runs

1 participant