Skip to content

Commit

Permalink
Don't record start time when Reactive REST Client returns a Multi
Browse files Browse the repository at this point in the history
Fixes: #23829
  • Loading branch information
geoand committed Mar 29, 2022
1 parent 850908a commit 110b509
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.netty.handler.codec.http.LastHttpContent;
import io.netty.handler.codec.http.multipart.InterfaceHttpData;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.stork.Stork;
import io.smallrye.stork.api.ServiceInstance;
Expand Down Expand Up @@ -408,7 +409,7 @@ public Uni<HttpClientRequest> createRequest(RestClientRequestContext state) {
try {
serviceInstance = Stork.getInstance()
.getService(serviceName)
.selectInstanceAndRecordStart(true);
.selectInstanceAndRecordStart(!Multi.class.equals(state.getResponseType().getRawType()));
} catch (Throwable e) {
log.error("Error selecting service instance for serviceName: " + serviceName, e);
return Uni.createFrom().failure(e);
Expand Down

0 comments on commit 110b509

Please sign in to comment.