Skip to content

Commit

Permalink
handle if null init callback (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarsilv authored Apr 10, 2024
1 parent 63e8e94 commit b8f086b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eppo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = "cloud.eppo"
version = "1.0.6"
version = "1.0.7"

android {
compileSdk 33
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public void onError(String errorMessage) {
})
.buildAndInit();

// Wait for initialization to succeed or fail, up to 10 seconds, before continuing
try {
if (!lock.await(10000, TimeUnit.MILLISECONDS)) {
throw new InterruptedException("Request for RAC did not complete within timeout");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public void load(InitializationCallback callback) {
@Override
public void onCacheLoadSuccess() {
cachedUsed.set(true);
callback.onCompleted();
if (callback != null) {
callback.onCompleted();
}
}

@Override
Expand Down

0 comments on commit b8f086b

Please sign in to comment.