Kernel: Correct pending feedback.

merge-requests/60/head
Fernando Sahmkow 2020-02-22 11:51:03 +07:00
parent b9472eae44
commit a1bf353780
1 changed files with 4 additions and 3 deletions

@ -530,10 +530,11 @@ SchedulerLockAndSleep::SchedulerLockAndSleep(KernelCore& kernel, Handle& event_h
}
SchedulerLockAndSleep::~SchedulerLockAndSleep() {
if (!sleep_cancelled) {
auto& time_manager = kernel.TimeManager();
time_manager.ScheduleTimeEvent(event_handle, time_task, nanoseconds);
if (sleep_cancelled) {
return;
}
auto& time_manager = kernel.TimeManager();
time_manager.ScheduleTimeEvent(event_handle, time_task, nanoseconds);
}
} // namespace Kernel