mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-19 15:01:29 +02:00
Fix worker cancellation
This commit is contained in:
@@ -434,10 +434,10 @@ func (c *GrpcClient) startEncryptionWorker(ctx context.Context, handler func(msg
|
||||
|
||||
c.decryptionWorker = NewWorker(c.decryptMessage, handler)
|
||||
c.decryptionWg.Add(1)
|
||||
workerCtx, workerCancel := context.WithCancel(ctx)
|
||||
c.decryptionWorkerCancel = workerCancel
|
||||
go func() {
|
||||
workerCtx, workerCancel := context.WithCancel(ctx)
|
||||
defer workerCancel()
|
||||
|
||||
c.decryptionWorker.Work(workerCtx)
|
||||
c.decryptionWg.Done()
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user