diff --git a/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java index 0b42f846..5a972c5e 100644 --- a/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java @@ -195,7 +195,7 @@ public class PostgresFullPrunedBlockStore implements FullPrunedBlockStore { private synchronized void maybeConnect() throws BlockStoreException { try { - if (conn.get() != null) + if (conn.get() != null && !conn.get().isClosed()) return; Properties props = new Properties();