Skip to content

Commit

Permalink
fix bug lazy client share_executor is null (#9701)
Browse files Browse the repository at this point in the history
  • Loading branch information
owen200008 committed Feb 25, 2022
1 parent 5bc4e91 commit ed2c2ad
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -197,6 +197,9 @@ public Result invoke(Invocation inv) throws RpcException {
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;
Expand Down

0 comments on commit ed2c2ad

Please sign in to comment.