Skip to content

Commit 5814131

Browse files
committed
FIX: Possible connection leak in Heartbeat
1 parent 82deb5b commit 5814131

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ private void testConnection() {
377377
} finally {
378378
try {
379379
if (conn != null) {
380+
if (!conn.getAutoCommit()) {
381+
conn.rollback();
382+
}
380383
conn.close();
381384
}
382385
} catch (SQLException ex) {

0 commit comments

Comments
 (0)