Fix JDBC client hanging the JVM on shutdown