Skip to content

Commit

Permalink
Fix ensure ndk libs are loaded before calling close (#3797)
Browse files Browse the repository at this point in the history
  • Loading branch information
markushi authored Oct 17, 2024
1 parent 87bdc75 commit a8c72dd
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ public static void init(@NotNull final SentryAndroidOptions options) {

/** Closes the NDK integration */
public static void close() {
shutdown();
try {
if (loadLibraryLatch.await(2000, TimeUnit.MILLISECONDS)) {
shutdown();
} else {
throw new IllegalStateException("Timeout waiting for Sentry NDK library to load");
}
} catch (InterruptedException e) {
throw new IllegalStateException(
"Thread interrupted while waiting for NDK libs to be loaded", e);
}
}
}

0 comments on commit a8c72dd

Please sign in to comment.