You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/03 05:08:33 UTC

[GitHub] [dubbo] EarthChen commented on a change in pull request #8668: [3.0-Triple]OnError in executor

EarthChen commented on a change in pull request #8668:
URL: https://github.com/apache/dubbo/pull/8668#discussion_r701587133



##########
File path: dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/UnaryClientStream.java
##########
@@ -75,17 +75,19 @@ public void doOnComplete() {
 
         @Override
         protected void onError(GrpcStatus status) {
-            Response response = new Response(getRequest().getId(), TripleConstant.TRI_VERSION);
-            response.setErrorMessage(status.description);
-            final AppResponse result = new AppResponse();
-            result.setException(getThrowable(this.getTrailers()));
-            result.setObjectAttachments(UnaryClientStream.this.parseMetadataToAttachmentMap(this.getTrailers()));
-            response.setResult(result);
-            if (!result.hasException()) {
-                final byte code = GrpcStatus.toDubboStatus(status.code);
-                response.setStatus(code);
-            }
-            DefaultFuture2.received(getConnection(), response);
+            execute(()-> {

Review comment:
       Please explain the reason for this change with a comment.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org