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 |