fix not return when channel closed
Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
@@ -251,6 +251,7 @@ func getVersionPeriodically(stopCh <-chan struct{}) {
|
||||
}
|
||||
select {
|
||||
case <-stopCh:
|
||||
return
|
||||
case <-time.After(scrapeTimeout):
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user