Stopped GUI from starting when only --server flag is set

This commit is contained in:
jath03 2020-12-24 01:05:55 -08:00 committed by Adam Honse
parent 36380457d6
commit 5c50cc2ca9
2 changed files with 27 additions and 17 deletions

15
cli.cpp
View file

@ -928,13 +928,6 @@ void ApplyOptions(DeviceOptions& options, std::vector<RGBController *> &rgb_cont
}
}
void WaitWhileServerOnline(NetworkServer* srv)
{
while (srv->GetOnline())
{
std::this_thread::sleep_for(1s);
};
}
unsigned int cli_pre_detection(int argc, char *argv[])
{
@ -1218,14 +1211,6 @@ unsigned int cli_post_detection(int argc, char *argv[])
}
}
/*---------------------------------------------------------*\
| If the server is online, keep running while it is online |
\*---------------------------------------------------------*/
if(ResourceManager::get()->GetServer()->GetOnline())
{
WaitWhileServerOnline(ResourceManager::get()->GetServer());
}
std::this_thread::sleep_for(1s);
exit(0);