Recycle connection if thread is interrupted after acquisition.

pull/796/head
Brett Wooldridge 8 years ago
parent a3173c51ca
commit 393ca0a7e6

@ -179,7 +179,7 @@ public class HikariPool extends PoolBase implements HikariPoolMXBean, IBagStateL
}
catch (InterruptedException e) {
if (poolEntry != null) {
recycle(poolEntry);
poolEntry.recycle(startTime);
}
Thread.currentThread().interrupt();
throw new SQLException(poolName + " - Interrupted during connection acquisition", e);

Loading…
Cancel
Save