From e07642f28a25b47841cf39b37c6511474716cd5c Mon Sep 17 00:00:00 2001 From: Arvid Norlander Date: Mon, 6 Mar 2023 22:51:49 +0100 Subject: [PATCH] Fix issue #2. --- src/monitor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monitor.rs b/src/monitor.rs index 3f4ee2b..1d94053 100644 --- a/src/monitor.rs +++ b/src/monitor.rs @@ -79,7 +79,7 @@ pub(crate) fn monitor( Err(Errno::EINTR) => { // Retry. if let Some(t) = timeout { - timeout = Some(t - now.elapsed()); + timeout = Some(t.saturating_sub(now.elapsed())); } continue 'main_loop; }