1.优化代码
This commit is contained in:
parent
42e4cce2c6
commit
ea077348a3
|
|
@ -202,9 +202,7 @@ public class DataSenderFactoryWithBalance {
|
|||
}
|
||||
|
||||
private static DataSender findReadySender() {
|
||||
|
||||
DataSender result = null;
|
||||
|
||||
int index = 0;
|
||||
|
||||
if (unusedServerAddresses.size() > 1){
|
||||
|
|
@ -234,11 +232,7 @@ public class DataSenderFactoryWithBalance {
|
|||
}
|
||||
|
||||
public static void unRegister(DataSender socket) {
|
||||
int index = usingDataSender.indexOf(socket);
|
||||
if (index != -1) {
|
||||
usingDataSender.get(index)
|
||||
.setStatus(DataSender.SenderStatus.FAILED);
|
||||
}
|
||||
socket.setStatus(DataSender.SenderStatus.FAILED);
|
||||
}
|
||||
|
||||
private static String listUsingServers(){
|
||||
|
|
|
|||
Loading…
Reference in New Issue