aboutsummaryrefslogtreecommitdiffstats
path: root/syz-ci/syz-ci.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-08-26 08:52:40 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-08-26 12:16:31 +0200
commit70596d3428a1360f168e7b2b9001db32edeb05e5 (patch)
tree42a51f5c4a1ae677bf811d3554e32d39760d148c /syz-ci/syz-ci.go
parent46009ca197a7fcd4acba62b1b3f9d5b8623daa65 (diff)
syz-ci: abort asset deprecation on syz-ci stop
Currently it only reacts on Ctrl+C, so the loop prevents e.g. the restart of syz-ci after an update.
Diffstat (limited to 'syz-ci/syz-ci.go')
-rw-r--r--syz-ci/syz-ci.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/syz-ci/syz-ci.go b/syz-ci/syz-ci.go
index 2f29fec5e..54d9b877c 100644
--- a/syz-ci/syz-ci.go
+++ b/syz-ci/syz-ci.go
@@ -261,7 +261,7 @@ func main() {
})
wg.Add(1)
- go deprecateAssets(cfg, shutdownPending, &wg)
+ go deprecateAssets(cfg, stop, &wg)
wg.Wait()
select {
@@ -271,7 +271,7 @@ func main() {
}
}
-func deprecateAssets(cfg *Config, shutdownPending chan struct{}, wg *sync.WaitGroup) {
+func deprecateAssets(cfg *Config, stop chan struct{}, wg *sync.WaitGroup) {
defer wg.Done()
if cfg.DashboardAddr == "" || cfg.AssetStorage.IsEmpty() ||
!cfg.AssetStorage.DoDeprecation {
@@ -292,7 +292,7 @@ loop:
for {
const sleepDuration = 6 * time.Hour
select {
- case <-shutdownPending:
+ case <-stop:
break loop
case <-time.After(sleepDuration):
}