mirror of
https://github.com/golang/go.git
synced 2026-06-27 19:30:52 +00:00
cmd/go: fix potention deadlock
Change-Id: I5cc0c9d69c56c6746e03c7ae2f6c0e49c8dbc7e4
GitHub-Last-Rev: b12cee8f97
GitHub-Pull-Request: golang/go#78885
Reviewed-on: https://go-review.googlesource.com/c/go/+/769320
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
b32283b27b
commit
66843181d1
1 changed files with 1 additions and 0 deletions
1
src/cmd/go/internal/cache/prog.go
vendored
1
src/cmd/go/internal/cache/prog.go
vendored
|
|
@ -204,6 +204,7 @@ func (c *ProgCache) send(ctx context.Context, req *cacheprog.Request) (*cachepro
|
|||
func (c *ProgCache) writeToChild(req *cacheprog.Request, resc chan<- *cacheprog.Response) (err error) {
|
||||
c.mu.Lock()
|
||||
if c.inFlight == nil {
|
||||
c.mu.Unlock()
|
||||
return errCacheprogClosed
|
||||
}
|
||||
c.nextID++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue