Skip to content

Commit

Permalink
[dubbo2.6] cherry up #7815 to dubbo2.6 (#7992)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoheng1 committed Jun 7, 2021
1 parent 077da34 commit 115cc7f
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -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;

Expand All @@ -27,6 +30,8 @@
*/
public class MultiMessageHandler extends AbstractChannelHandlerDelegate {

protected static final Logger logger = LoggerFactory.getLogger(MultiMessageHandler.class);

public MultiMessageHandler(ChannelHandler handler) {
super(handler);
}
Expand All @@ -37,7 +42,12 @@ public void received(Channel channel, Object message) throws RemotingException {
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);
Expand Down

0 comments on commit 115cc7f

Please sign in to comment.