Other: Factory reset

This commit is contained in:
James Houlahan
2022-10-13 03:26:31 +02:00
parent cec44be7c3
commit a74b025de3
8 changed files with 62 additions and 12 deletions

View File

@ -151,6 +151,15 @@ func (vault *Vault) DeleteUser(userID string) error {
}
func (vault *Vault) Close() error {
vault.refLock.Lock()
defer vault.refLock.Unlock()
if len(vault.ref) > 0 {
return errors.New("vault is still in use")
}
vault.gcm = nil
return nil
}