From 49a2c9169c040daa17f0735f9e911944c179eb2c Mon Sep 17 00:00:00 2001 From: Xpl0itU <24777100+Xpl0itU@users.noreply.github.com> Date: Sun, 23 Jul 2023 13:05:59 +0200 Subject: [PATCH] Create new channel for every decryption --- decryption.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/decryption.go b/decryption.go index f929387..eadc76c 100644 --- a/decryption.go +++ b/decryption.go @@ -23,10 +23,11 @@ func callProgressCallback(progress C.int) { progressChan <- int(progress) } -var progressChan = make(chan int) +var progressChan chan int func DecryptContents(path string, progress *ProgressWindow, deleteEncryptedContents bool) error { errorChan := make(chan error) + progressChan = make(chan int) defer close(errorChan) go runDecryption(path, errorChan, deleteEncryptedContents)