fix not return when channel closed

Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
kerthcet 2022-01-14 10:47:01 +08:00
parent f1da8cd3e2
commit 3734e05e14

View File

@ -251,6 +251,7 @@ func getVersionPeriodically(stopCh <-chan struct{}) {
}
select {
case <-stopCh:
return
case <-time.After(scrapeTimeout):
}
}