Skip to content

Don't remove shutdown hook when closing DB

akwizgran requested to merge 1120-crash-removing-shutdown-hook into master

I found the cause of this crash by chance while testing !643 (merged). If the VM exits without calling close() first, the shutdown hook calls close() and tries to remove itself.

There's actually no need to remove the hook in the case of a clean shutdown because we already return from close() if it's been called before. So the fix is just to leave the hook in place.

Needs backport. Closes #1120 (closed).

Merge request reports