mirror of https://github.com/golang/go.git
In `internal/lsp/cmd.(*connection).diagnoseFiles`, when we request for `gopls/diagnoseFiles`, we are blocked on the channel even if there is an error. In such a scenario, we've reach a deadlock since. Avoid this by checking for error, existing if it exists and also closing the channel while we're at it. Fixes golang/go#46251 Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Change-Id: I4266ab3ac272a9ae3eac2084b70b6568b72c1984 GitHub-Last-Rev: 94bf2926a0f35d51d62643618a8072ef5a8b5225 GitHub-Pull-Request: golang/tools#324 Reviewed-on: https://go-review.googlesource.com/c/tools/+/329109 Reviewed-by: Rebecca Stambler <rstambler@golang.org> Trust: Rebecca Stambler <rstambler@golang.org> Trust: Heschi Kreinick <heschi@google.com> Run-TryBot: Rebecca Stambler <rstambler@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> |
||
|---|---|---|
| .. | ||
| test | ||
| call_hierarchy.go | ||
| capabilities_test.go | ||
| check.go | ||
| cmd.go | ||
| cmd_test.go | ||
| definition.go | ||
| export_test.go | ||
| folding_range.go | ||
| format.go | ||
| highlight.go | ||
| implementation.go | ||
| imports.go | ||
| info.go | ||
| links.go | ||
| prepare_rename.go | ||
| references.go | ||
| remote.go | ||
| rename.go | ||
| semantictokens.go | ||
| serve.go | ||
| signature.go | ||
| subcommands.go | ||
| suggested_fix.go | ||
| symbols.go | ||
| workspace.go | ||
| workspace_symbol.go | ||