From 93dd7f21226f93a7b5ddd49c1eed89ed9d535e54 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sun, 28 Sep 2025 01:57:07 -0500 Subject: [PATCH] Start server before detecting devices --- ResourceManager.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ResourceManager.cpp b/ResourceManager.cpp index 3fbf09daf..871d7dce0 100644 --- a/ResourceManager.cpp +++ b/ResourceManager.cpp @@ -1780,6 +1780,22 @@ void ResourceManager::InitCoroutine() } } + /*-----------------------------------------------------*\ + | Start server if requested | + \*-----------------------------------------------------*/ + if(start_server) + { + detection_percent = 0; + detection_string = "Starting server"; + DetectionProgressChanged(); + + GetServer()->StartServer(); + if(!GetServer()->GetOnline()) + { + LOG_DEBUG("[ResourceManager] Server failed to start"); + } + } + /*-----------------------------------------------------*\ | Perform actual detection if enabled | | Done in the same thread (InitThread), as we need to | @@ -1802,22 +1818,6 @@ void ResourceManager::InitCoroutine() ProcessPostDetection(); } - /*-----------------------------------------------------*\ - | Start server if requested | - \*-----------------------------------------------------*/ - if(start_server) - { - detection_percent = 100; - detection_string = "Starting server"; - DetectionProgressChanged(); - - GetServer()->StartServer(); - if(!GetServer()->GetOnline()) - { - LOG_DEBUG("[ResourceManager] Server failed to start"); - } - } - /*-----------------------------------------------------*\ | Process command line arguments after detection only | | if the pre-detection parsing indicated it should be |