stopping in virtual server needs a usleep before acquiring lock to get status

This commit is contained in:
2020-08-27 18:21:46 +02:00
parent abd2808924
commit bc5cc3fa29
7 changed files with 7 additions and 7 deletions

View File

@ -2347,7 +2347,7 @@ int stopStateMachine() {
sharedMemory_setStop(1);
// read till status is idle
while (sharedMemory_getStatus() == RUNNING)
;
usleep(500);
sharedMemory_setStop(0);
LOG(logINFO, ("Stopped State Machine\n"));
return OK;