Skip to content

Commit

Permalink
gopls/internal/server: remove spurious Async in legacy RunGoVulncheck
Browse files Browse the repository at this point in the history
In the partial rollback CL 627556, I failed to remove the call to
jsonrpc2.Async in RunGoVulncheck, which is now (once again) async to
request handling. This introduces a race, leading to a panic if the
handler responds before the call to Async.

Fixes golang/go#70355

Change-Id: I8b33599a3f62b82dc6acf9d9b3616194c0372b9c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/628236
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
findleyr committed Nov 15, 2024
1 parent b1c39aa commit 56ec111
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions gopls/internal/server/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -1294,8 +1294,6 @@ func (c *commandHandler) RunGovulncheck(ctx context.Context, args command.Vulnch
}, func(ctx context.Context, deps commandDeps) error {
tokenChan <- deps.work.Token()

jsonrpc2.Async(ctx) // run this in parallel with other requests: vulncheck can be slow.

workDoneWriter := progress.NewWorkDoneWriter(ctx, deps.work)
dir := filepath.Dir(args.URI.Path())
pattern := args.Pattern
Expand Down

0 comments on commit 56ec111

Please sign in to comment.