aboutsummaryrefslogtreecommitdiffstats
path: root/jrt/src/com/yahoo/jrt/tool
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-08-12 16:25:23 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2022-08-12 16:25:23 +0200
commitf222275505d0f83ed557b9b94fd2d2a5615ca5d8 (patch)
treee0668e81f4b33f048631a726b2664dacd0aface1 /jrt/src/com/yahoo/jrt/tool
parent43830a7f7975080dbc4c25804a2506ab102c7868 (diff)
Add method to use Duration as timeout to make unit explicit, and avoid many magic conversions.
Diffstat (limited to 'jrt/src/com/yahoo/jrt/tool')
-rw-r--r--jrt/src/com/yahoo/jrt/tool/RpcInvoker.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/jrt/src/com/yahoo/jrt/tool/RpcInvoker.java b/jrt/src/com/yahoo/jrt/tool/RpcInvoker.java
index 71049673d90..67933cfafde 100644
--- a/jrt/src/com/yahoo/jrt/tool/RpcInvoker.java
+++ b/jrt/src/com/yahoo/jrt/tool/RpcInvoker.java
@@ -16,6 +16,7 @@ import com.yahoo.jrt.Transport;
import com.yahoo.jrt.Value;
import com.yahoo.jrt.Values;
+import java.time.Duration;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
@@ -80,7 +81,7 @@ public class RpcInvoker {
supervisor = new Supervisor(new Transport("invoker"));
target = supervisor.connect(new Spec(connectspec));
Request request = createRequest(method,arguments);
- target.invokeSync(request,10.0);
+ target.invokeSync(request, Duration.ofSeconds(10));
if (request.isError()) {
System.err.println("error(" + request.errorCode() + "): " + request.errorMessage());
return;