mirror of
https://github.com/golang/go
synced 2024-11-18 19:04:40 -07:00
internal/lsp: don't log context.Cancelation in diagnostics
Fixes golang/go#34103. Change-Id: I76e713d54422d31b587cedd0e4359c8b3bc7845e Reviewed-on: https://go-review.googlesource.com/c/tools/+/215019 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
parent
0508ad4c83
commit
872a348c38
@ -39,6 +39,9 @@ func (s *Server) diagnose(ctx context.Context, snapshot source.Snapshot) {
|
||||
// Diagnose all of the packages in the workspace.
|
||||
go func() {
|
||||
wsPackages, err := snapshot.WorkspacePackages(ctx)
|
||||
if ctx.Err() != nil {
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
log.Error(ctx, "diagnose: no workspace packages", err, telemetry.Directory.Of(snapshot.View().Folder))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user