mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Fix continuous TOTP copy
This commit is contained in:
@@ -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]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user