mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Prevent admins from using restart option which can leak DB connections. Adds timeouts to TTS HTTPS requests (rust-g version bump required). (#90182)
🆑 config: Added `TTS_HTTP_TIMEOUT_SECONDS` for setting the maximum duration TTS HTTP requests can run for before being aborted. /🆑 DNM because we need the rust-g PR to get released: https://github.com/tgstation/rust-g/pull/210 Crit prio because rounds will not restart if there are hung TTS requests and the TTS server is absolute dogshit and doesn't prevent them.
This commit is contained in:
@@ -22,7 +22,12 @@ ADMIN_VERB(toggle_hub, R_SERVER, "Toggle Hub", "Toggles the server's visilibilit
|
||||
#define HARDEST_RESTART "Hardest Restart (No actions, just reboot)"
|
||||
#define TGS_RESTART "Server Restart (Kill and restart DD)"
|
||||
ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.", ADMIN_CATEGORY_SERVER)
|
||||
var/list/options = list(REGULAR_RESTART, REGULAR_RESTART_DELAYED, HARD_RESTART, HARDEST_RESTART)
|
||||
var/list/options = list(REGULAR_RESTART, REGULAR_RESTART_DELAYED, HARD_RESTART)
|
||||
|
||||
// this option runs a codepath that can leak db connections because it skips subsystem (specifically SSdbcore) shutdown
|
||||
if(!SSdbcore.IsConnected())
|
||||
options += HARDEST_RESTART
|
||||
|
||||
if(world.TgsAvailable())
|
||||
options += TGS_RESTART;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user