X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/0979625154094df73577d6e2be2d0e9a0a87306c..448c931a776c3e3f65ca2eab11da0c062d597818:/whatsapp.go diff --git a/whatsapp.go b/whatsapp.go index 91ee675..df43e8e 100644 --- a/whatsapp.go +++ b/whatsapp.go @@ -309,6 +309,7 @@ func (w *WhatsApp) Run(ctx context.Context, l *TurnLoop, notify func(Event)) err cancel := func() { } + defer func() { cancel() pairing.Wait()