Skip to content

Commit 38c9a88

Browse files
authored
Make sure last LSP client is disconnected before creating a new one (#912)
1 parent c2ec7c9 commit 38c9a88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lsp/ClientConnectionManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ export class ClientConnectionManager {
7575

7676
private create_new_client() {
7777
const port = this.client?.port ?? -1;
78+
this.client?.io?.removeAllListeners();
7879
this.client?.events?.removeAllListeners();
80+
this.client?.stop();
7981
this.client = new GDScriptLanguageClient();
8082
this.client.port = port;
8183
this.client.events.on("status", this.on_client_status_changed.bind(this));

0 commit comments

Comments
 (0)