Stop looping when scheduler receives an AppExit (#536)

This commit is contained in:
memoryruins 2020-09-20 19:32:07 -04:00 committed by GitHub
parent 74dba5f36b
commit fd1d6a388d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,10 +94,8 @@ impl Plugin for ScheduleRunnerPlugin {
#[cfg(not(target_arch = "wasm32"))]
{
loop {
if let Some(delay) = tick(&mut app, wait) {
thread::sleep(delay);
}
while let Some(delay) = tick(&mut app, wait) {
thread::sleep(delay);
}
}