Other: Mitigate double-unlock of user keyring

We need to unlock the user keyring anyway to unlock the address keyring,
so we should just return it instead of re-unlocking the user keyring
when sending a message.
This commit is contained in:
James Houlahan
2022-10-20 15:35:33 +02:00
parent 80d3f7d179
commit 81f4ef609b
9 changed files with 153 additions and 94 deletions

View File

@ -43,7 +43,7 @@ const (
)
func (user *User) sync(ctx context.Context) error {
return user.withAddrKRs(func(addrKRs map[string]*crypto.KeyRing) error {
return user.withAddrKRs(func(_ *crypto.KeyRing, addrKRs map[string]*crypto.KeyRing) error {
logrus.Info("Beginning sync")
if !user.vault.SyncStatus().HasLabels {