Skip to content

Commit b2fb034

Browse files
darthorimarintellij-monorepo-bot
authored andcommitted
[lsp] refactoring, extract LspConnection to a separate interface
so it's possible to test for disconnection in tests LSP-166 GitOrigin-RevId: a1fdd4f820c6f60dc8a3f31d22c13cc306d5a96a
1 parent 1754403 commit b2fb034

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kotlin-lsp/src/com/jetbrains/ls/kotlinLsp/KotlinLspServer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ private fun run(runConfig: KotlinLspServerRunConfig) {
8484
tcpConnection(
8585
clientMode = mode is KotlinLspServerMode.Socket.Client,
8686
port = mode.port,
87-
) { input, output ->
88-
handleRequests(input, output, config, mode)
87+
) { connection ->
88+
handleRequests(connection.inputStream, connection.outputStream, config, mode)
8989
}
9090
}
9191
}

0 commit comments

Comments
 (0)