diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java index 0c7517a29139f..62bed99697d57 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java @@ -166,6 +166,10 @@ public Future createRequest(RestClientRequestContext state) { requestOptions.setURI(uri.getPath() + (uri.getQuery() == null ? "" : "?" + uri.getQuery())); requestOptions.setFollowRedirects(followRedirects); requestOptions.setSsl(isHttps); + Object readTimeout = state.getConfiguration().getProperty(QuarkusRestClientProperties.READ_TIMEOUT); + if (readTimeout instanceof Long) { + requestOptions.setTimeout((Long) readTimeout); + } return httpClient.request(requestOptions); } diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InvocationBuilderImpl.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InvocationBuilderImpl.java index f6e8ec865331c..5d34b20c78eeb 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InvocationBuilderImpl.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InvocationBuilderImpl.java @@ -10,8 +10,6 @@ import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import javax.ws.rs.ProcessingException; import javax.ws.rs.WebApplicationException; import javax.ws.rs.client.CompletionStageRxInvoker; @@ -197,8 +195,8 @@ private T unwrap(CompletableFuture c) { throw new BlockingNotAllowedException(); } try { - return c.get(readTimeoutMs, TimeUnit.MILLISECONDS); - } catch (InterruptedException | TimeoutException e) { + return c.get(); + } catch (InterruptedException e) { throw new ProcessingException(e); } catch (ExecutionException e) { if (e.getCause() instanceof ProcessingException) {