1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Read keys on storage start

This commit is contained in:
Mikhail Rakhmanov 2025-04-09 12:14:04 +02:00
parent 1f3c2b98cf
commit 3fde9b9ef8
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B

View file

@ -82,7 +82,7 @@ func New(
if err != nil {
return nil, err
}
return &storage{
s := &storage{
inner: inner,
keys: keys,
storageId: storageId,
@ -90,7 +90,11 @@ func New(
indexer: indexer,
syncClient: syncClient,
readKeys: make(map[string]crypto.SymKey),
}, nil
}
s.aclList.RLock()
defer s.aclList.RUnlock()
err = s.readKeysFromAclState(s.aclList.AclState())
return s, err
}
func (s *storage) Id() string {