From 103f70ec0c4d8dfbd7dfa39ba9af729688f6d515 Mon Sep 17 00:00:00 2001 From: Garvan Keeley Date: Mon, 15 Jun 2020 19:19:00 -0400 Subject: [PATCH] Fix #6802: onReady() not filling the Deferred in the error case --- Sync/SyncStateMachine.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sync/SyncStateMachine.swift b/Sync/SyncStateMachine.swift index ab6b2e456272..190cf5876ab5 100644 --- a/Sync/SyncStateMachine.swift +++ b/Sync/SyncStateMachine.swift @@ -147,7 +147,7 @@ open class SyncStateMachine { RustFirefoxAccounts.shared.accountManager.uponQueue(.main) { accountManager in authState.token(Date.now(), canBeExpired: false).uponQueue(.main) { success in guard let (token, kSync) = success.successValue else { - assert(false) + readyDeferred.fill(Maybe(failure: success.failureValue ?? FxAClientError.local(NSError()))) return } log.debug("Got token from auth state.")