DUBBO-71 Graceful shutdown-半关闭状态
git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@335 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
parent
49831bdf4c
commit
1038a11dad
|
|
@ -103,13 +103,10 @@ public class DubboInvoker<T> extends AbstractInvoker<T> {
|
|||
public boolean isAvailable() {
|
||||
if (!super.isAvailable())
|
||||
return false;
|
||||
if (clients.length ==1){
|
||||
return clients[0].isConnected();
|
||||
} else {
|
||||
for (ExchangeClient client : clients){
|
||||
if (client.isConnected()){
|
||||
return true;
|
||||
}
|
||||
for (ExchangeClient client : clients){
|
||||
//cannot write == not Available ?
|
||||
if (client.isConnected() && !client.hasAttribute(Constants.CHANNEL_CANNOTWRITE_KEY)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue