Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
8b39d4c1a1
|
@@ -392,7 +392,10 @@ func (e *Engine) removeFromTokenIndex(id int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) Start(ctx context.Context) {
|
func (e *Engine) Start(ctx context.Context) {
|
||||||
ctx, e.cancel = context.WithCancel(ctx)
|
// 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()
|
||||||
|
|
||||||
e.writerWG.Add(1)
|
e.writerWG.Add(1)
|
||||||
go e.dbWriter(ctx)
|
go e.dbWriter(ctx)
|
||||||
|
|||||||
Reference in New Issue
Block a user