Skip to content

Commit

Permalink
Request exit even if it's not running
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Oct 11, 2024
1 parent 10d66ac commit 8292b55
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,16 @@ extern "C" {
rtld_fini,
stack_end
);
exitThread = true;
if(stateThreadRunning){
_DEBUG("Waiting for thread to exit");
exitThread = true;
stateThread.join();
if(stateThread.joinable()){
stateThread.join();
}else{
while(stateThreadRunning){
usleep(1000);
}
}
}
return res;
}
Expand Down

0 comments on commit 8292b55

Please sign in to comment.