You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/06/07 07:34:18 UTC

[dubbo] branch 2.6.x updated: [dubbo2.6] cherry up #7815 to dubbo2.6 (#7992)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/2.6.x by this push:
     new 115cc7f  [dubbo2.6] cherry up #7815 to dubbo2.6 (#7992)
115cc7f is described below

commit 115cc7ff9dd91e7344d800fe9cf0627ae14601e7
Author: xiaoheng1 <20...@qq.com>
AuthorDate: Mon Jun 7 15:34:08 2021 +0800

    [dubbo2.6] cherry up #7815 to dubbo2.6 (#7992)
---
 .../dubbo/remoting/transport/MultiMessageHandler.java        | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/MultiMessageHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/MultiMessageHandler.java
index 80ff9a3..3cd8f00 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/MultiMessageHandler.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/MultiMessageHandler.java
@@ -16,8 +16,11 @@
  */
 package com.alibaba.dubbo.remoting.transport;
 
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
 import com.alibaba.dubbo.remoting.Channel;
 import com.alibaba.dubbo.remoting.ChannelHandler;
+import com.alibaba.dubbo.remoting.ExecutionException;
 import com.alibaba.dubbo.remoting.RemotingException;
 import com.alibaba.dubbo.remoting.exchange.support.MultiMessage;
 
@@ -27,6 +30,8 @@ import com.alibaba.dubbo.remoting.exchange.support.MultiMessage;
  */
 public class MultiMessageHandler extends AbstractChannelHandlerDelegate {
 
+    protected static final Logger logger = LoggerFactory.getLogger(MultiMessageHandler.class);
+
     public MultiMessageHandler(ChannelHandler handler) {
         super(handler);
     }
@@ -37,7 +42,12 @@ public class MultiMessageHandler extends AbstractChannelHandlerDelegate {
         if (message instanceof MultiMessage) {
             MultiMessage list = (MultiMessage) message;
             for (Object obj : list) {
-                handler.received(channel, obj);
+                try {
+                    handler.received(channel, obj);
+                } catch (ExecutionException e) {
+                    logger.error("MultiMessageHandler received fail.", e);
+                    handler.caught(channel, e);
+                }
             }
         } else {
             handler.received(channel, message);