From 3de5e5d4d412e854df698b1854b9e9c7630634dd Mon Sep 17 00:00:00 2001 From: azuloo Date: Wed, 16 Aug 2023 16:29:28 +0300 Subject: [PATCH] Fixes LSP connection error when launched in a separate thread (cherry picked from commit a5710d468b8f99d723116bbd71af83ac3ea35598) --- modules/gdscript/language_server/gdscript_language_server.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gdscript/language_server/gdscript_language_server.cpp b/modules/gdscript/language_server/gdscript_language_server.cpp index 062be0fe20a..8c444832880 100644 --- a/modules/gdscript/language_server/gdscript_language_server.cpp +++ b/modules/gdscript/language_server/gdscript_language_server.cpp @@ -73,6 +73,7 @@ void GDScriptLanguageServer::_notification(int p_what) { } void GDScriptLanguageServer::thread_main(void *p_userdata) { + set_current_thread_safe_for_nodes(true); GDScriptLanguageServer *self = static_cast(p_userdata); while (self->thread_running) { // Poll 20 times per second