Skip to content

Commit

Permalink
Misc edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed May 6, 2024
1 parent 6d6ff4a commit 5a37f28
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions convex-peer/src/main/java/convex/api/ConvexRemote.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import convex.core.store.AStore;
import convex.core.store.Stores;
import convex.core.transactions.ATransaction;
import convex.core.util.ThreadUtils;
import convex.core.util.Utils;
import convex.net.Connection;
import convex.peer.Server;
Expand Down Expand Up @@ -132,9 +131,7 @@ public synchronized CompletableFuture<Result> transact(SignedData<ATransaction>
long wait=1;

// loop until request is queued
ThreadUtils.runVirtual(()->{

});

while (true) {
synchronized (awaiting) {
id = connection.sendTransaction(signed);
Expand Down Expand Up @@ -177,7 +174,7 @@ public CompletableFuture<Result> query(ACell query, Address address) throws IOEx
// If we can't send yet, block briefly and try again
try {
Thread.sleep(wait);
wait+=1; // linear backoff
wait+=wait; // exponential backoff
} catch (InterruptedException e) {
throw new IOException("Transaction sending interrupted",e);
}
Expand Down

0 comments on commit 5a37f28

Please sign in to comment.