3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 06:44:16 +00:00

close connection regardless of autocommit status and set conn to null

This commit is contained in:
eleetas 2014-07-28 23:36:05 -07:00 committed by Mike Hearn
parent d681c72b30
commit 914752623d

View File

@ -222,7 +222,10 @@ public class PostgresFullPrunedBlockStore implements FullPrunedBlockStore {
try {
if(!conn.getAutoCommit()) {
conn.rollback();
conn.close();
}
conn.close();
if(conn == this.conn.get()) {
this.conn.set(null);
}
} catch (SQLException ex) {
throw new RuntimeException(ex);