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 2022/02/25 08:53:26 UTC
[dubbo] branch master updated: fix bug lazy client share_executor is null (#9701)
This is an automated email from the ASF dual-hosted git repository.
albumenj 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 ed2c2ad fix bug lazy client share_executor is null (#9701)
ed2c2ad is described below
commit ed2c2ad7eb5616ca2d76ecf3d5fea45b37d3dee0
Author: Owen.Cai <89...@qq.com>
AuthorDate: Fri Feb 25 16:53:12 2022 +0800
fix bug lazy client share_executor is null (#9701)
---
.../src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
index 2c749b4..c1193c4 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractInvoker.java
@@ -197,6 +197,9 @@ public abstract class AbstractInvoker<T> implements Invoker<T> {
protected ExecutorService getCallbackExecutor(URL url, Invocation inv) {
ExecutorService sharedExecutor = ExtensionLoader.getExtensionLoader(ExecutorRepository.class).getDefaultExtension().getExecutor(url);
if (InvokeMode.SYNC == RpcUtils.getInvokeMode(getUrl(), inv)) {
+ if(sharedExecutor == null) {
+ sharedExecutor = ExtensionLoader.getExtensionLoader(ExecutorRepository.class).getDefaultExtension().getSharedExecutor();
+ }
return new ThreadlessExecutor(sharedExecutor);
} else {
return sharedExecutor;