fixed start/stop of webinterface from GUI

This commit is contained in:
csoler 2019-11-13 21:06:20 +01:00
parent d19d1685de
commit 9007d266a8
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
6 changed files with 43 additions and 17 deletions

View file

@ -452,7 +452,22 @@ void JsonApiServer::setNewAccessRequestCallback(
const std::function<bool (const std::string&)>& callback )
{ mNewAccessRequestCallback = callback; }
void JsonApiServer::shutdown() { mService.stop(); }
void JsonApiServer::shutdown()
{
mService.stop();
RsThread::ask_for_stop();
std::cerr << "Stopping JsonApiServer" ;
while(isRunning())
{
sleep(1);
std::cerr << "." ;
std::cerr.flush();
}
std::cerr << std::endl;
}
bool JsonApiServer::requestNewTokenAutorization(const std::string& token)
{