Check closed condition before attempting to set network timeout.

pull/1159/head
Brett Wooldridge 7 years ago
parent 6a13980312
commit 88b57c3bd7

@ -128,9 +128,10 @@ abstract class PoolBase
try {
LOGGER.debug("{} - Closing connection {}: {}", poolName, connection, closureReason);
try {
if (!connection.isClosed()) {
setNetworkTimeout(connection, SECONDS.toMillis(15));
}
finally {
} finally {
connection.close(); // continue with the close even if setNetworkTimeout() throws
}
}

Loading…
Cancel
Save