novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

H2FullPrunedBlockStore not closing connections #516

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The close() method in H2FullPrunedBlockStore.java does not close the 
connections to the H2 DB, but instead it revokes them:

    public synchronized void close() {
        for (Connection conn : allConnections) {
            try {
                conn.rollback();
            } catch (SQLException ex) {
                throw new RuntimeException(ex);
            }
        }
        allConnections.clear();
    }

The code should close the connections or else the database won't be unlocked 
until the process is dead.

Original issue reported on code.google.com by ximo.gua...@gmail.com on 9 Feb 2014 at 5:05

GoogleCodeExporter commented 9 years ago
Sounds like a fairly quick one for someone to tackle, do you want to try to fix 
this one up?

Original comment by BlueMatt...@gmail.com on 14 Feb 2014 at 11:12

GoogleCodeExporter commented 9 years ago
Fix in https://github.com/bitcoinj/bitcoinj/pull/123

Original comment by ximo.gua...@gmail.com on 26 Jun 2014 at 1:26

GoogleCodeExporter commented 9 years ago
Merged, thanks!

Original comment by mh.in.en...@gmail.com on 26 Jun 2014 at 2:27