feat: refresh expired access tokens in one goroutine

This commit is contained in:
James Houlahan
2020-04-16 14:44:59 +02:00
parent 40e96b9d1e
commit 3f32fd95e0
6 changed files with 56 additions and 34 deletions

View File

@ -5,10 +5,11 @@
package mocks
import (
reflect "reflect"
credentials "github.com/ProtonMail/proton-bridge/internal/bridge/credentials"
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockConfiger is a mock of Configer interface

View File

@ -528,7 +528,6 @@ func (u *User) Logout() (err error) {
u.wasKeyringUnlocked = false
u.unlockingKeyringLock.Unlock()
// TODO: Is this necessary or could it be done by ClientManager when a nil auth is received?
u.client().Logout()
if err = u.credStorer.Logout(u.userID); err != nil {