mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-30 09:07:32 -04:00
fixed shutdown callback issue in retroshare-service.cc
This commit is contained in:
parent
1bf07f72c4
commit
b4bfdf2e25
2 changed files with 5 additions and 3 deletions
|
@ -22,7 +22,6 @@
|
||||||
/// RetroShare initialization and login API implementation
|
/// RetroShare initialization and login API implementation
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <math.h>
|
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
#ifndef WINDOWS_SYS
|
#ifndef WINDOWS_SYS
|
||||||
|
|
|
@ -284,8 +284,11 @@ int main(int argc, char* argv[])
|
||||||
if(jsonApiServer)
|
if(jsonApiServer)
|
||||||
jsonApiServer->authorizeToken("webui:"+webui_pass1);
|
jsonApiServer->authorizeToken("webui:"+webui_pass1);
|
||||||
|
|
||||||
while(true)
|
std::atomic<bool> keepRunning = true;
|
||||||
sleep(1);
|
rsControl->setShutdownCallback([&](int){keepRunning = false;});
|
||||||
|
|
||||||
|
while(keepRunning)
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(5));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue