mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08: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 a new issue