Skip to content

Commit

Permalink
Add callTimeout field to ConductorClient builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ystxn committed Nov 26, 2024
1 parent 003fda3 commit 3713828
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ protected ConductorClient(Builder<?> builder) {
okHttpBuilder.writeTimeout(builder.writeTimeout, TimeUnit.MILLISECONDS);
}

if (builder.callTimeout > -1) {
okHttpBuilder.callTimeout(builder.callTimeout, TimeUnit.MILLISECONDS);
}

if (builder.proxy != null) {
okHttpBuilder.proxy(builder.proxy);
}
Expand Down Expand Up @@ -442,6 +446,7 @@ public static class Builder<T extends Builder<T>> {
private long connectTimeout = -1;
private long readTimeout = -1;
private long writeTimeout = -1;
private long callTimeout = -1;
private Proxy proxy;
private ConnectionPoolConfig connectionPoolConfig;
private Supplier<ObjectMapper> objectMapperSupplier = () -> new ObjectMapperProvider().getObjectMapper();
Expand Down Expand Up @@ -487,6 +492,11 @@ public T writeTimeout(long writeTimeout) {
return self();
}

public T callTimeout(long callTimeout) {
this.callTimeout = callTimeout;
return self();
}

public T proxy(Proxy proxy) {
this.proxy = proxy;
return self();
Expand Down

0 comments on commit 3713828

Please sign in to comment.