Apply mirroring delay to last iteration
This commit is contained in:
@@ -171,6 +171,7 @@ func mirrorLog(ctx context.Context, wg *sync.WaitGroup, path string, fromStart b
|
|||||||
// Don't seek this time, because we know it's a new file
|
// Don't seek this time, because we know it's a new file
|
||||||
mirrorAvailableMessages(f, mf)
|
mirrorAvailableMessages(f, mf)
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
log.Debugf("Context cancelled for mirroring %v", path)
|
log.Debugf("Context cancelled for mirroring %v", path)
|
||||||
@@ -180,9 +181,9 @@ func mirrorLog(ctx context.Context, wg *sync.WaitGroup, path string, fromStart b
|
|||||||
}
|
}
|
||||||
// Set a flag, to allow one more time through the loop
|
// Set a flag, to allow one more time through the loop
|
||||||
closing = true
|
closing = true
|
||||||
default:
|
|
||||||
time.Sleep(500 * time.Millisecond)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time.Sleep(500 * time.Millisecond)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return errorChannel, nil
|
return errorChannel, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user