We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eae15aa commit 3df1c90Copy full SHA for 3df1c90
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
@@ -1627,6 +1627,7 @@ public SpannerOptions build() {
1627
// As we are using plain text, we should never send any credentials.
1628
this.setCredentials(NoCredentials.getInstance());
1629
} else if (managedChannel != null) {
1630
+ // Add shutdown hook for the ManagedChannel if created to prevent resource leak
1631
Runtime.getRuntime()
1632
.addShutdownHook(
1633
new Thread(
0 commit comments