mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #111290 from HolonProduction/lsp-restart
LSP: Fix repeated restart attempts
This commit is contained in:
commit
bc0342b3ef
2 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,8 @@ void GDScriptLanguageServer::_notification(int p_what) {
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_INTERNAL_PROCESS: {
|
case NOTIFICATION_INTERNAL_PROCESS: {
|
||||||
if (!started && EditorNode::get_singleton()->is_editor_ready()) {
|
if (!start_attempted && EditorNode::get_singleton()->is_editor_ready()) {
|
||||||
|
start_attempted = true;
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ class GDScriptLanguageServer : public EditorPlugin {
|
||||||
|
|
||||||
Thread thread;
|
Thread thread;
|
||||||
bool thread_running = false;
|
bool thread_running = false;
|
||||||
|
// There is no notification when the editor is initialized. We need to poll till we attempted to start the server.
|
||||||
|
bool start_attempted = false;
|
||||||
bool started = false;
|
bool started = false;
|
||||||
bool use_thread = false;
|
bool use_thread = false;
|
||||||
String host = "127.0.0.1";
|
String host = "127.0.0.1";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue