summaryrefslogtreecommitdiff
path: root/internal/lsp/handlers_completion.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-02 14:05:16 +0200
committerPaul Buetow <paul@buetow.org>2026-03-02 14:05:16 +0200
commit8fa31daeba7a6617f08027a5f9f68bb612587772 (patch)
tree25979d0c922eff767ef33e14091d66bb8fcee20a /internal/lsp/handlers_completion.go
parent4649658bd71c4754dc5dde2fb5e1f4de2fe269d4 (diff)
lsp: cancel handler contexts on shutdown via server context (task 423)
Diffstat (limited to 'internal/lsp/handlers_completion.go')
-rw-r--r--internal/lsp/handlers_completion.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/lsp/handlers_completion.go b/internal/lsp/handlers_completion.go
index 6350c59..4212897 100644
--- a/internal/lsp/handlers_completion.go
+++ b/internal/lsp/handlers_completion.go
@@ -104,7 +104,7 @@ func (s *Server) logCompletionContext(p CompletionParams, above, current, below,
}
func (s *Server) tryLLMCompletion(p CompletionParams, above, current, below, funcCtx, docStr string, hasExtra bool, extraText string) ([]CompletionItem, bool, bool) {
- ctx, cancel := context.WithTimeout(context.Background(), 12*time.Second)
+ ctx, cancel := s.requestTimeoutContext(12 * time.Second)
var cancelOnce sync.Once
end := func() { cancelOnce.Do(cancel) }