From 408f05bbb9a159b34c587a6195b1cf32d0484df3 Mon Sep 17 00:00:00 2001 From: Itamar Date: Fri, 3 Dec 2021 09:46:20 +0200 Subject: [PATCH] HackStudio: Decrease the maximal crash frequency of the server to 10 sec The maximal crash frequency of the language server was previously 3 seconds, but in practice it was too high. When working with larger projects the language server can get into a "crash and respawn" loop that takes more than 3 seconds. 10 seconds seems like a reasonable threshold beyond which we no longer attempt to respawn the server. --- Userland/DevTools/HackStudio/LanguageClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/DevTools/HackStudio/LanguageClient.cpp b/Userland/DevTools/HackStudio/LanguageClient.cpp index 28ee936889..bfe87b1711 100644 --- a/Userland/DevTools/HackStudio/LanguageClient.cpp +++ b/Userland/DevTools/HackStudio/LanguageClient.cpp @@ -171,7 +171,7 @@ void ServerConnectionWrapper::on_crash() show_crash_notification(); m_connection.clear(); - static constexpr int max_crash_frequency_seconds = 3; + static constexpr int max_crash_frequency_seconds = 10; if (m_last_crash_timer.is_valid() && m_last_crash_timer.elapsed() / 1000 < max_crash_frequency_seconds) { dbgln("LanguageServer crash frequency is too high"); m_respawn_allowed = false;