nip13: defer cancel() calls.

This commit is contained in:
fiatjaf
2024-10-18 07:08:47 -03:00
parent 28b05cdd9b
commit b58c4c5516
2 changed files with 5 additions and 2 deletions

View File

@@ -87,6 +87,7 @@ func DoWork(ctx context.Context, event nostr.Event, targetDifficulty int) (nostr
}
ctx, cancel := context.WithCancel(ctx)
defer cancel()
nthreads := runtime.NumCPU()
tagCh := make(chan nostr.Tag)