Skip to content

Commit 9c92cee

Browse files
authored
Fixes memory leak in lsp-mode (#3075)
- Fixes #3062
1 parent 591528d commit 9c92cee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lsp-mode.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6280,8 +6280,8 @@ WORKSPACE is the active workspace."
62806280
(/ (nth 2 (time-since before-send)) 1000))
62816281
workspace))
62826282
(when callback
6283-
(funcall callback (lsp:json-response-result json-data))
6284-
(remhash id (lsp--client-response-handlers client)))))
6283+
(remhash id (lsp--client-response-handlers client))
6284+
(funcall callback (lsp:json-response-result json-data)))))
62856285
('response-error
62866286
(cl-assert id)
62876287
(-let [(_ callback method _ before-send) (gethash id (lsp--client-response-handlers client))]
@@ -6291,8 +6291,8 @@ WORKSPACE is the active workspace."
62916291
'incoming-resp (/ (nth 2 (time-since before-send)) 1000))
62926292
workspace))
62936293
(when callback
6294-
(funcall callback (lsp:json-response-error-error json-data))
6295-
(remhash id (lsp--client-response-handlers client)))))
6294+
(remhash id (lsp--client-response-handlers client))
6295+
(funcall callback (lsp:json-response-error-error json-data)))))
62966296
('notification
62976297
(lsp--on-notification workspace json-data))
62986298
('request (lsp--on-request workspace json-data)))))))

0 commit comments

Comments
 (0)