Start server before detecting devices

This commit is contained in:
Adam Honse
2025-09-28 01:57:07 -05:00
parent c71cc4f18a
commit 93dd7f2122

View File

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