Stopped GUI from starting when only --server flag is set
This commit is contained in:
parent
36380457d6
commit
5c50cc2ca9
2 changed files with 27 additions and 17 deletions
15
cli.cpp
15
cli.cpp
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue