fix: do not immediately drop lock

This commit is contained in:
Milas Bowman 2024-05-05 20:08:36 -04:00
parent 933a4cf851
commit cc342852ed
Signed by: milas
SSH key fingerprint: SHA256:ek2D5l1HA34B3wbdErz0QOXm1E46CVvyf/nM4Fwfx/U

View file

@ -131,7 +131,7 @@ fn main() -> anyhow::Result<()> {
loop {
let guard = act.last_activity.lock().unwrap();
let last = *guard;
let (_, result) = act
let (_unused, result) = act
.condvar
.wait_timeout_while(guard, Duration::from_secs(args.timeout.into()), |instant| {
*instant == last