Skip to content

Commit

Permalink
gopls/internal/lsp/cache: fix use of time.NewTimer instead of NewTicker
Browse files Browse the repository at this point in the history
Another facepalm. Discovered during manual testing of the prerelease.

Change-Id: I5fdb173a68ad8659d773259bcc737b4f708d23ab
Reviewed-on: https://go-review.googlesource.com/c/tools/+/512957
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
findleyr committed Jul 26, 2023
1 parent b389785 commit da5abd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gopls/internal/lsp/cache/parse_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (c *parseCache) startParse(mode parser.Mode, purgeFuncBodies bool, fhs ...s

func (c *parseCache) gc() {
const period = 10 * time.Second // gc period
timer := time.NewTimer(period)
timer := time.NewTicker(period)
defer timer.Stop()

for {
Expand Down

0 comments on commit da5abd3

Please sign in to comment.