Skip to content
Browse files
fix: all throwables should be ignored in shutdown hook (#950)
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 213dddcb4f84e19be2f98115493208e3af819485
Showing with 1 addition and 1 deletion.
  1. +1 −1 google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/
@@ -104,7 +104,7 @@ private final class CloseSpannerRunnable implements Runnable {
public void run() {
try {
} catch (Exception e) {
} catch (Throwable e) {
// ignore

0 comments on commit 213dddc

Please sign in to comment.