This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new c9f12ca MessageOnlyChannelHandler class should be consistent with the
writing of the ExecutionChannelHandler class. (#5724)
c9f12ca is described below
commit c9f12ca17770d7035f1f9bf0a27c18fd6c4dce5a
Author: qinliujie <[email protected]>
AuthorDate: Mon Feb 10 16:10:08 2020 +0800
MessageOnlyChannelHandler class should be consistent with the writing of
the ExecutionChannelHandler class. (#5724)
fix #5256
---
.../transport/dispatcher/message/MessageOnlyChannelHandler.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/message/MessageOnlyChannelHandler.java
b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/message/MessageOnlyChannelHandler.java
index 2cd20cc..c3c2585 100644
---
a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/message/MessageOnlyChannelHandler.java
+++
b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/message/MessageOnlyChannelHandler.java
@@ -21,11 +21,13 @@ import org.apache.dubbo.remoting.Channel;
import org.apache.dubbo.remoting.ChannelHandler;
import org.apache.dubbo.remoting.ExecutionException;
import org.apache.dubbo.remoting.RemotingException;
+import org.apache.dubbo.remoting.exchange.Request;
import org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable;
import
org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.ChannelState;
import org.apache.dubbo.remoting.transport.dispatcher.WrappedChannelHandler;
import java.util.concurrent.ExecutorService;
+import java.util.concurrent.RejectedExecutionException;
public class MessageOnlyChannelHandler extends WrappedChannelHandler {
@@ -39,6 +41,10 @@ public class MessageOnlyChannelHandler extends
WrappedChannelHandler {
try {
executor.execute(new ChannelEventRunnable(channel, handler,
ChannelState.RECEIVED, message));
} catch (Throwable t) {
+ if(message instanceof Request && t instanceof
RejectedExecutionException){
+ sendFeedback(channel, (Request) message, t);
+ return;
+ }
throw new ExecutionException(message, channel, getClass() + "
error when process received event .", t);
}
}