From 42edefe6f39af5ab6110950d7e817720a9eed970 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Mon, 29 May 2023 20:41:43 +0200 Subject: [PATCH] Fix dropped exception on JSON stream cancellation --- .../jboss/resteasy/reactive/client/impl/MultiInvoker.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/MultiInvoker.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/MultiInvoker.java index e84f30da72ee6..9a0efc53b2909 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/MultiInvoker.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/MultiInvoker.java @@ -241,7 +241,6 @@ public void handle(Buffer buffer) { }); // this captures the end of the response - // FIXME: won't this call complete twice()? vertxClientResponse.endHandler(v -> { multiRequest.emitter.complete(); }); @@ -265,9 +264,9 @@ public void handle(Buffer chunk) { try { R item = restClientRequestContext.readEntity(in, responseType, response.getMediaType(), response.getMetadata()); - multiRequest.emitter.emit(item); + multiRequest.emit(item); } catch (IOException e) { - multiRequest.emitter.fail(e); + multiRequest.fail(e); } } }); @@ -275,7 +274,7 @@ public void handle(Buffer chunk) { if (t == ConnectionBase.CLOSED_EXCEPTION) { // we can ignore this one since we registered a closeHandler } else { - multiRequest.emitter.fail(t); + multiRequest.fail(t); } }); vertxClientResponse.endHandler(new Handler() {