fix race condition with timestamp
This commit is contained in:
parent
bcaf0e910c
commit
b67ac078b8
|
@ -47,10 +47,13 @@ func (r *RSS) Gather(acc telegraf.Accumulator) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// remember last time started
|
// remember last time started
|
||||||
ts = time.Now()
|
tsl := time.Now()
|
||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
|
// set last time started
|
||||||
|
ts = tsl
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue