feat: retry client auth delete while api is unreachable

This commit is contained in:
James Houlahan
2020-04-16 14:07:00 +02:00
parent 80f4e1e346
commit 40e96b9d1e

View File

@ -141,8 +141,8 @@ func (cm *ClientManager) LogoutClient(userID string) {
go func() { go func() {
if !strings.HasPrefix(userID, "anonymous-") { if !strings.HasPrefix(userID, "anonymous-") {
if err := client.DeleteAuth(); err != nil { for client.DeleteAuth() == ErrAPINotReachable {
// TODO: Retry if the request failed. cm.log.Warn("Logging out client failed because API was not reachable, retrying...")
} }
} }
client.ClearData() client.ClearData()