fix race condition with timestamp

This commit is contained in:
dom 2018-07-11 11:29:53 +02:00
parent bcaf0e910c
commit b67ac078b8
1 changed files with 4 additions and 1 deletions

View File

@ -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
} }