Skip to content

Commit 4e435f2

Browse files
committed
Handle exit notification by cleanly stopping the virtual connection provider and closing streams to prevent shutdown timeouts in lsp4ij
1 parent fcac002 commit 4e435f2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

third_party/src/main/java/com/jetbrains/lang/dart/lsp/DartVirtualStreamConnectionProvider.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ class DartVirtualStreamConnectionProvider(private val project: Project) : Stream
190190
paramsObj.addProperty("id", legacyIdToCancel)
191191
cancelReq.add("params", paramsObj)
192192
DartAnalysisServerService.getInstance(project).sendRequest(cancelReqId, cancelReq)
193+
} else if (message.method == "exit") {
194+
logger.info("Received exit notification from lsp4ij, stopping connection provider")
195+
stop()
193196
} else {
194197
logger.info("Ignored unimplemented method from lsp4ij notification: ${message.method}")
195198
}

0 commit comments

Comments
 (0)