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 {
172
172
)
173
173
174
174
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
176
181
Task {
177
- for outstandingRequest in self . outstandingRequests. values {
178
- outstandingRequest. replyHandler ( LSPResult . failure ( ResponseError . internalError ( " JSON-RPC Connection closed " ) ) )
179
- }
180
182
await self . closeHandler ? ( )
181
- self . receiveHandler = nil // break retain cycle
182
183
}
183
184
}
184
185
You can’t perform that action at this time.
0 commit comments