Skip to content

Commit

Permalink
fix: all throwables should be ignored in shutdown hook (#950)
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 16, 2021
1 parent 3f2933b commit 213dddc
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 213dddc

Please sign in to comment.