From f58997f4aa334d89dca38fe5087f42e71daa0ab6 Mon Sep 17 00:00:00 2001 From: Ian Luo Date: Wed, 24 Oct 2018 13:57:21 +0800 Subject: [PATCH] #2016: merge fix from 2.7.0 to 2.6.x (#2680) --- .../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) {