diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-24 10:31:11 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-24 10:31:11 +0200 |
commit | 95ffba343f14d7274e08099b9aca5a85da2259ed (patch) | |
tree | f6a965fcce0a11dbab951e13acef24ab8ab7e9d9 /src/table/gc.rs | |
parent | 59b43914d4a9ae9a50ae79fee61b1a46bff941f9 (diff) | |
download | garage-95ffba343f14d7274e08099b9aca5a85da2259ed.tar.gz garage-95ffba343f14d7274e08099b9aca5a85da2259ed.zip |
Error reporting
Diffstat (limited to 'src/table/gc.rs')
-rw-r--r-- | src/table/gc.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/table/gc.rs b/src/table/gc.rs index d088a11c..0899d5e5 100644 --- a/src/table/gc.rs +++ b/src/table/gc.rs @@ -357,7 +357,10 @@ where } } - async fn wait_for_work(&mut self, _must_exit: &watch::Receiver<bool>) -> WorkerStatus { + async fn wait_for_work(&mut self, must_exit: &watch::Receiver<bool>) -> WorkerStatus { + if *must_exit.borrow() { + return WorkerStatus::Done; + } tokio::time::sleep(self.wait_delay).await; WorkerStatus::Busy } |