Skip to content

Commit

Permalink
Merge pull request #4631 from oscarguindzberg/fixPeerGroupStop
Browse files Browse the repository at this point in the history
Stop PeerGroup only if running
  • Loading branch information
ripcurlx authored Oct 13, 2020
2 parents 88f9eee + 1c0655e commit e5dd316
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/main/java/bisq/core/btc/setup/WalletConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,13 @@ protected void shutDown() throws Exception {

// vPeerGroup.stop has no timeout and can take very long (10 sec. in my test). So we call it at the end.
// We might get likely interrupted by the parent call timeout.
vPeerGroup.stop();
if (vPeerGroup.isRunning()) {
vPeerGroup.stop();
log.info("PeerGroup stopped");
} else {
log.info("PeerGroup not stopped because it was not running");
}
vPeerGroup = null;
log.info("PeerGroup stopped");
} catch (BlockStoreException e) {
throw new IOException(e);
}
Expand Down

0 comments on commit e5dd316

Please sign in to comment.