This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git
commit f6da71462c5b909df55391116b6a6906ed46ff62 Author: zhengyangyong <[email protected]> AuthorDate: Mon Jan 1 11:30:47 2018 +0800 SCB-126 fix pr comment Signed-off-by: zhengyangyong <[email protected]> --- .../io/servicecomb/core/provider/consumer/InvokerUtils.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/io/servicecomb/core/provider/consumer/InvokerUtils.java b/core/src/main/java/io/servicecomb/core/provider/consumer/InvokerUtils.java index 3005ce1..3a9b310 100644 --- a/core/src/main/java/io/servicecomb/core/provider/consumer/InvokerUtils.java +++ b/core/src/main/java/io/servicecomb/core/provider/consumer/InvokerUtils.java @@ -87,12 +87,16 @@ public final class InvokerUtils { ReactiveResponseExecutor respExecutor = new ReactiveResponseExecutor(); invocation.setResponseExecutor(respExecutor); - invocation.next(asyncResp); + AsyncResponse wrappedAsyncResponse = response -> { + invocation.triggerFinishedEvent(); + asyncResp.handle(response); + }; + + invocation.next(wrappedAsyncResponse); } catch (Throwable e) { + invocation.triggerFinishedEvent(); LOGGER.error("invoke failed, {}", invocation.getOperationMeta().getMicroserviceQualifiedName()); asyncResp.consumerFail(e); - } finally { - invocation.triggerFinishedEvent(); } } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
