Skip to content

Commit

Permalink
hardcodes scheduled refresh period
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Greer committed Nov 15, 2023
1 parent 7f47260 commit 0b15576
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class IterableAuthManager {
private final IterableApi api;
private final IterableAuthHandler authHandler;
private final long expiringAuthTokenRefreshPeriod;

private final long scheduledRefreshPeriod = 10000;
@VisibleForTesting
Timer timer;
private boolean hasFailedPriorAuth;
Expand Down Expand Up @@ -89,7 +89,7 @@ private void handleAuthTokenSuccess(String authToken, IterableHelper.SuccessHand
} else {
IterableLogger.w(TAG, "Auth token received as null. Calling the handler in 10 seconds");
//TODO: Make this time configurable and in sync with SDK initialization flow for auth null scenario
scheduleAuthTokenRefresh(10000);
scheduleAuthTokenRefresh(scheduledRefreshPeriod);
authHandler.onTokenRegistrationFailed(new Throwable("Auth token null"));
return;
}
Expand Down Expand Up @@ -120,7 +120,7 @@ public void queueExpirationRefresh(String encodedJWT) {
IterableLogger.e(TAG, "Error while parsing JWT for the expiration", e);
authHandler.onTokenRegistrationFailed(new Throwable("Auth token decode failure. Scheduling auth token refresh in 10 seconds..."));
//TODO: Sync with configured time duration once feature is available.
scheduleAuthTokenRefresh(10000);
scheduleAuthTokenRefresh(scheduledRefreshPeriod);
}
}

Expand Down

0 comments on commit 0b15576

Please sign in to comment.