Skip to content

Commit

Permalink
Merge pull request bisq-network#1380 from alvasw/fix_keypair_service_…
Browse files Browse the repository at this point in the history
…persistence_data_races

KeyPairService: Fix Persistence Data Races
  • Loading branch information
alvasw authored Nov 14, 2023
2 parents 7c51c4f + b54a7e0 commit 72c87e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/src/main/java/bisq/security/KeyPairService.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void persistKeyPair(String keyId, KeyPair keyPair) {
synchronized (persistableStore) {
persistableStore.put(keyId, keyPair);
}
persist();
persist().join();
}

public CompletableFuture<KeyPair> getOrCreateKeyPairAsync(String keyId) {
Expand All @@ -95,7 +95,7 @@ public CompletableFuture<KeyPair> getOrCreateKeyPairAsync(String keyId) {
synchronized (persistableStore) {
persistableStore.put(keyId, keyPair);
}
persist();
persist().join();
return keyPair;
} catch (GeneralSecurityException e) {
e.printStackTrace();
Expand Down

0 comments on commit 72c87e1

Please sign in to comment.