Forráskód Böngészése

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.
Itamar 3 éve
szülő
commit
408f05bbb9
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Userland/DevTools/HackStudio/LanguageClient.cpp

+ 1 - 1
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;