chaoyoung commented on code in PR #16585:
URL: https://github.com/apache/dubbo/pull/16585#discussion_r4585746719


##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/h12/AbstractServerTransportListener.java:
##########
@@ -158,32 +159,48 @@ protected void onMetadataError(HEADER metadata, Throwable 
throwable) {
     protected void initializeAltSvc(URL url) {}
 
     @Override
-    public final void onData(MESSAGE message) {
+    public final void onData(MESSAGE input) {
+        MESSAGE message = onDataReceived(input);
         if (executor == null) {
             onDataFinally(message);
             return;
         }
-        executor.execute(() -> {
-            try {
-                doOnData(message);
-            } catch (Throwable t) {
-                logError(t);
-                onError(message, t);
-            } finally {
-                onDataFinally(message);
-            }
-        });
+        try {
+            executor.execute(() -> {
+                try {
+                    doOnData(message);
+                } catch (Throwable t) {
+                    logError(t);
+                    onError(message, t);
+                } finally {
+                    onDataFinally(message);
+                }
+            });
+        } catch (RejectedExecutionException e) {
+            onError(message, e);

Review Comment:
   Confirmed and fixed in f6432631cf. The rejection path now invokes 
onDataFinally(message) in a finally block around onError(message, e), so 
finalization is preserved even if the error handler throws. The rejection 
regression failed with 0 finalizations before the change and now asserts 
exactly 1, alongside exactly-once body release. The full Triple test package 
and real WebSocket checks passed before pushing; details are in the validation 
follow-up.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to