Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
8f479635f9
|
@@ -392,10 +392,7 @@ func (e *Engine) removeFromTokenIndex(id int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) Start(ctx context.Context) {
|
func (e *Engine) Start(ctx context.Context) {
|
||||||
// e.cancel is invoked by Stop() to drain and halt the writer; gosec can't
|
ctx, e.cancel = context.WithCancel(ctx)
|
||||||
// trace the cross-method call, and cancelling the parent reaps this child
|
|
||||||
// regardless, so the leak it warns about can't occur.
|
|
||||||
ctx, e.cancel = context.WithCancel(ctx) //nolint:gosec // cancel is called in Stop()
|
|
||||||
|
|
||||||
e.writerWG.Add(1)
|
e.writerWG.Add(1)
|
||||||
go e.dbWriter(ctx)
|
go e.dbWriter(ctx)
|
||||||
|
|||||||
Reference in New Issue
Block a user