Skip to content

Commit

Permalink
fix: all throwables should be ignored in shutdown hook
Browse files Browse the repository at this point in the history
All throwables (and not just exceptions) should be ignored in the shutdown hook.
Failing to close these resources during shutdown is not a major problem, as they
will be garbage collected by the backend anyways. Without this wide catch, some
applications will log a ClassNotFoundException when shutting down, which can be
confusing for end users.

Fixes #949
  • Loading branch information
olavloite committed Mar 11, 2021
1 parent 4088981 commit 06e24a8
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -104,7 +104,7 @@ private final class CloseSpannerRunnable implements Runnable {
public void run() {
try {
checkAndCloseSpanners(CheckAndCloseSpannersMode.WARN);
} catch (Exception e) {
} catch (Throwable e) {
// ignore
}
}
Expand Down

0 comments on commit 06e24a8

Please sign in to comment.