File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Sources/LanguageServerProtocolJSONRPC Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -172,13 +172,14 @@ public final class JSONRPCConnection: Connection {
172172 )
173173
174174 ioGroup. notify ( queue: queue) { [ weak self] in
175- guard let self = self else { return }
175+ guard let self else { return }
176+ for outstandingRequest in self . outstandingRequests. values {
177+ outstandingRequest. replyHandler ( LSPResult . failure ( ResponseError . internalError ( " JSON-RPC Connection closed " ) ) )
178+ }
179+ self . outstandingRequests = [ : ]
180+ self . receiveHandler = nil // break retain cycle
176181 Task {
177- for outstandingRequest in self . outstandingRequests. values {
178- outstandingRequest. replyHandler ( LSPResult . failure ( ResponseError . internalError ( " JSON-RPC Connection closed " ) ) )
179- }
180182 await self . closeHandler ? ( )
181- self . receiveHandler = nil // break retain cycle
182183 }
183184 }
184185
You can’t perform that action at this time.
0 commit comments