Fix continuous TOTP copy

This commit is contained in:
2025-11-10 00:35:38 -05:00
parent 75ad2afcfb
commit 14dda0b091
+2 -1
View File
@@ -46,9 +46,10 @@ func CopyArgument(targetLocation string, field int) error {
errorChan := make(chan error) errorChan := make(chan error)
go TOTPCopier(decSlice[2], field, errorChan, nil) // "done" is not needed because the process runs until the program is killed go TOTPCopier(decSlice[2], field, errorChan, nil) // "done" is not needed because the process runs until the program is killed
err = <-errorChan err = <-errorChan
if err != nil { // block until first successful copy if err != nil { // handle error from first copy
return errors.New("error encountered in TOTP refresh process: " + err.Error()) return errors.New("error encountered in TOTP refresh process: " + err.Error())
} }
select {} // block indefinitely
} else { // other } else { // other
copySubject = decSlice[realField] copySubject = decSlice[realField]
} }