diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-02 14:05:16 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-02 14:05:16 +0200 |
| commit | 8fa31daeba7a6617f08027a5f9f68bb612587772 (patch) | |
| tree | 25979d0c922eff767ef33e14091d66bb8fcee20a /internal/lsp/handlers_completion.go | |
| parent | 4649658bd71c4754dc5dde2fb5e1f4de2fe269d4 (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.go | 2 |
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) } |
