Make sure last LSP client is disconnected before creating a new one. #912
Make sure last LSP client is disconnected before creating a new one. #912jstraceski wants to merge 3 commits intogodotengine:masterfrom
Conversation
|
Could you check whether your original issue was solved by #968 This PR looks alright as safeguard. But in concept |
|
I tested a build of this branch, and it seems to fix #978. At least with the repro steps of restarting Godot that are described in the comments. |
|
@HolonProduction Do you think this is safe to merge? If so, I can merge it and tag 2.6.2. |
|
The I verified that just the |
The LSP client seems to have left over resources when restarting godot.
This causes CTRL-hover to fail after restarting godot because multiple
textDocument/definitionrequests are sent.Steps to reproduce issue:
If you have a debuging window open you should see
rx/txsimilar to this:This change disconnects io functions, and stops the last valid LSP client before making a new client.
(I did test this on godot > 4.5 but I have made some local changes so there is a chance that it is not required under the current stable godot version.)