Fix for #3012 Manual server shutdown leads to memory leak

The issue being that shutdown() // with no args was
not calling ShutdownManager.unregisterDatabase(this)
noting that shutdown(boolean, boolean) did.

This change merges the old shutdownInternal(boolean, boolean)
method into shutdown(boolean, boolean) and simplifies
shutdown() to just call shutdown(boolean, boolean).
This commit is contained in:
Rob Bygrave
2023-03-29 20:59:23 +13:00
parent b4f309c219
commit e1522df8a5
3 changed files with 20 additions and 35 deletions
@@ -143,7 +143,7 @@ public final class ShutdownManager {
}
// shutdown any registered servers that have not
// already been shutdown manually
for (Database server : databases) {
for (Database server : new ArrayList<>(databases)) {
try {
server.shutdown();
} catch (Exception ex) {