mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +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
db56ee0e28
commit
02b83e0957
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