aboutsummaryrefslogtreecommitdiff
path: root/src/table/gc.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-24 10:31:11 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-24 10:31:11 +0200
commit95ffba343f14d7274e08099b9aca5a85da2259ed (patch)
treef6a965fcce0a11dbab951e13acef24ab8ab7e9d9 /src/table/gc.rs
parent59b43914d4a9ae9a50ae79fee61b1a46bff941f9 (diff)
downloadgarage-95ffba343f14d7274e08099b9aca5a85da2259ed.tar.gz
garage-95ffba343f14d7274e08099b9aca5a85da2259ed.zip
Error reporting
Diffstat (limited to 'src/table/gc.rs')
-rw-r--r--src/table/gc.rs5
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
}