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



##########
File path: 
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ClientTransportObserver.java
##########
@@ -68,8 +68,8 @@ protected void doOnData(byte[] data, boolean endStream) {
     }
 
     @Override
-    protected void doOnReset(Http2Error http2Error) {
-        streamChannel.writeAndFlush(new DefaultHttp2ResetFrame(http2Error))
+    protected void doOnCancel(GrpcStatus status) {

Review comment:
       Can `GrpcStatus` be removed if we always send cancel?

##########
File path: 
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/AbstractStream.java
##########
@@ -420,10 +420,10 @@ public Metadata getTrailers() {
         }
 
         @Override
-        public void onReset(Http2Error http2Error) {
+        public void onCancel(GrpcStatus status) {
             if (getState().allowSendReset()) {
                 getState().setResetSend();

Review comment:
       Remove setResetSend() method ,This state is already set in transport

##########
File path: 
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ServerTransportObserver.java
##########
@@ -81,8 +81,8 @@ protected void doOnData(byte[] data, boolean endStream) {
     }
 
     @Override
-    protected void doOnReset(Http2Error http2Error) {
-        ctx.writeAndFlush(new DefaultHttp2ResetFrame(http2Error))
+    protected void doOnCancel(GrpcStatus status) {
+        ctx.writeAndFlush(new DefaultHttp2ResetFrame(Http2Error.CANCEL))

Review comment:
       like pre.




-- 
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-unsubscr...@dubbo.apache.org

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



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

Reply via email to