fix race condition with timestamp
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user