mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 17:13:22 +00:00
Merge pull request #299 from prometheus/fix/sd-refresh-condition
Fix DNS-SD target refresh condition.
This commit is contained in:
commit
8702ec0673
@ -52,7 +52,7 @@ func NewSdTargetProvider(job config.JobConfig) *sdTargetProvider {
|
||||
}
|
||||
|
||||
func (p *sdTargetProvider) Targets() ([]Target, error) {
|
||||
if time.Since(p.lastRefresh) > p.refreshInterval {
|
||||
if time.Since(p.lastRefresh) < p.refreshInterval {
|
||||
return p.targets, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user