aboutsummaryrefslogtreecommitdiff
path: root/src/internal/pkgbits/encoder.go
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2025-01-06 16:02:38 -0500
committerMichael Matloob <matloob@golang.org>2025-01-07 10:21:05 -0800
commitd93b549f0502ad9f44b7eacc282c304b22d2603b (patch)
tree29b1d1c4adcea3c551b49bae75090cb7fe8b9d08 /src/internal/pkgbits/encoder.go
parentd62154db837fef880714f710bafbe0af94034b40 (diff)
downloadgo-d93b549f0502ad9f44b7eacc282c304b22d2603b.tar.xz
cmd/go/internal/cache: handle cacheprog not responding to close
Allow a gocacheprog to not respond to close. The intention of the code is that after we send the close message we'd ignore errors reading from the cacheprog's stdout. But before this change if a cacheprog did not respond to close and we got an EOF reading from the cacheprog's stdout we'd just ignore all pending requests. The send operation would then block forever waiting for a response. With this change, we close all response channels for pending responses if there's an error reading from the cacheprog's stdout while we're closing. The receives from the response channels would then proceed (but now have to handle a nil value). Then the send operation would return and the (*ProgCache).Close function can proceed. Fixes #70848 Change-Id: I6631d317ba7aea3f25f714f31cd2aeef0f4d4e3e Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/640516 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/internal/pkgbits/encoder.go')
0 files changed, 0 insertions, 0 deletions