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) {
|
||||
// e.cancel is invoked by Stop() to drain and halt the writer; gosec can't
|
||||
// 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()
|
||||
ctx, e.cancel = context.WithCancel(ctx)
|
||||
|
||||
e.writerWG.Add(1)
|
||||
go e.dbWriter(ctx)
|
||||
|
||||
Reference in New Issue
Block a user