mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Add simple healthcheck
This commit is contained in:
@@ -161,6 +161,18 @@ void CServerHandler::startLocalServerAndConnect()
|
|||||||
threadRunLocalServer->join();
|
threadRunLocalServer->join();
|
||||||
|
|
||||||
th->update();
|
th->update();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
CConnection testConnection(settings["server"]["server"].String(), getDefaultPort(), NAME, uuid);
|
||||||
|
logNetwork->error("Port is busy, kill other vcmiserver processes");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
//no connection means that port is not busy and we can start local server
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef VCMI_ANDROID
|
#ifdef VCMI_ANDROID
|
||||||
{
|
{
|
||||||
CAndroidVMHelper envHelper;
|
CAndroidVMHelper envHelper;
|
||||||
|
Reference in New Issue
Block a user