mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
lib/promscrape/discovery: remove superflouos check in registerPendingAPIWatchers
The check `_, ok := uw.aws[aw]; !ok` isn't needed, since aw cannot exist in uw.aws because of the check inside subscribeAPIWatcher
This commit is contained in:
parent
3ec6639bbb
commit
59f9960992
1 changed files with 1 additions and 3 deletions
|
@ -437,9 +437,7 @@ func (uw *urlWatcher) registerPendingAPIWatchers() {
|
|||
for aw := range uw.awsPending {
|
||||
awsPending = append(awsPending, aw)
|
||||
delete(uw.awsPending, aw)
|
||||
if _, ok := uw.aws[aw]; !ok {
|
||||
uw.aws[aw] = struct{}{}
|
||||
}
|
||||
uw.aws[aw] = struct{}{}
|
||||
}
|
||||
uw.reloadScrapeWorksForAPIWatchers(awsPending, uw.objectsByKey)
|
||||
uw.mu.Unlock()
|
||||
|
|
Loading…
Reference in a new issue