From 223d7a8e8c26ef4d03b606b1bea832f7a6ac7e7b Mon Sep 17 00:00:00 2001 From: beiwei30 Date: Wed, 24 Oct 2018 10:47:44 +0800 Subject: [PATCH] #2016: merge fix from 2.7.0 to 2.6.x --- .../com/alibaba/dubbo/rpc/protocol/AbstractInvoker.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/protocol/AbstractInvoker.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/protocol/AbstractInvoker.java index 2e4980b72d1..4ab44b7674d 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/protocol/AbstractInvoker.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/protocol/AbstractInvoker.java @@ -124,11 +124,12 @@ public String toString() { @Override public Result invoke(Invocation inv) throws RpcException { + // if invoker is destroyed due to address refresh from registry, let's allow the current invoke to proceed if (destroyed.get()) { - throw new RpcException("Rpc invoker for service " + this + " on consumer " + NetUtils.getLocalHost() - + " use dubbo version " + Version.getVersion() - + " is DESTROYED, can not be invoked any more!"); + logger.warn("Invoker for service " + this + " on consumer " + NetUtils.getLocalHost() + " is destroyed, " + + ", dubbo version is " + Version.getVersion() + ", this invoker should not be used any longer"); } + RpcInvocation invocation = (RpcInvocation) inv; invocation.setInvoker(this); if (attachment != null && attachment.size() > 0) {