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.
This commit is contained in:
Itamar 2021-12-03 09:46:20 +02:00 committed by Andreas Kling
parent 28ff7d49ad
commit 408f05bbb9
Notes: sideshowbarker 2024-07-17 23:12:43 +09:00

View File

@ -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;