From 90ec065c65479b8fefcb4321ded53e5a5134613c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Tue, 5 Aug 2025 11:09:11 +0200 Subject: [PATCH] Fix worker cancellation --- signal/client/grpc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/signal/client/grpc.go b/signal/client/grpc.go index 0961a44ec..bfc221858 100644 --- a/signal/client/grpc.go +++ b/signal/client/grpc.go @@ -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() }()