Skip to content

Commit

Permalink
Update ClientConnectionHandler.java
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay92 committed May 1, 2015
1 parent 359ba54 commit 0d318f2
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/edu/tomr/loadbalancer/ClientConnectionHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ public void run() {
private synchronized String getIPAddress() {
String IPAddress = null;
try{
if(turnOf == ConfigParams.getIpAddresses().size() - 1){
IPAddress = ConfigParams.getIpAddresses().get(turnOf);

if(turnOf > ConfigParams.getIpAddresses().size() - 1){
turnOf = 0;

}
else{
IPAddress = ConfigParams.getIpAddresses().get(turnOf);
turnOf++;
}
}
IPAddress = ConfigParams.getIpAddresses().get(turnOf);
turnOf++;
}
catch(Exception e){
Constants.globalLog.debug("Error while trying to access the IP Addresses for scheduling");
Expand Down

0 comments on commit 0d318f2

Please sign in to comment.