Skip to content

Commit

Permalink
apply timeout to both method signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Apr 22, 2023
1 parent 3c1f031 commit 7f60a77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/io/cryostat/net/TargetConnectionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ public class TargetConnectionManager {

public <T> CompletableFuture<T> executeConnectedTaskAsync(
ConnectionDescriptor connectionDescriptor, ConnectedTask<T> task) {
return executeConnectedTaskAsync(connectionDescriptor, task, this.executor)
.orTimeout(jmxConnectionTimeout, TimeUnit.SECONDS);
return executeConnectedTaskAsync(connectionDescriptor, task, this.executor);
}

public <T> CompletableFuture<T> executeConnectedTaskAsync(
Expand All @@ -168,7 +167,8 @@ public <T> CompletableFuture<T> executeConnectedTaskAsync(
throw new CompletionException(e);
}
},
ex);
ex)
.orTimeout(jmxConnectionTimeout, TimeUnit.SECONDS);
}

public <T> T executeConnectedTask(
Expand Down

0 comments on commit 7f60a77

Please sign in to comment.