Skip to content

Commit

Permalink
Fixed the non-binding let on a synchronization lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko19907 committed Jul 15, 2024
1 parent 34737b7 commit ea4c5dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ impl Controller {

let mut running = lock.lock().unwrap();
*running = false;
let (_, timeout_result) = cvar.wait_timeout(running, interval).unwrap();
let (new_running, timeout_result) = cvar.wait_timeout(running, interval).unwrap();
running = new_running;

if timeout_result.timed_out() {
let controller = controller.lock().unwrap();
Expand Down

0 comments on commit ea4c5dc

Please sign in to comment.