From b6ee6f708c7a20b95901e9dede1a3966e33d0419 Mon Sep 17 00:00:00 2001 From: Vinay-Kumar1992 Date: Sun, 19 Apr 2015 16:31:14 -0400 Subject: [PATCH] Update ClientConnectionHandler.java Fixed the problem with the Round-Robin Scheduling --- src/edu/tomr/loadbalancer/ClientConnectionHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/edu/tomr/loadbalancer/ClientConnectionHandler.java b/src/edu/tomr/loadbalancer/ClientConnectionHandler.java index c945f41..44f89e8 100644 --- a/src/edu/tomr/loadbalancer/ClientConnectionHandler.java +++ b/src/edu/tomr/loadbalancer/ClientConnectionHandler.java @@ -67,8 +67,9 @@ private synchronized String getIPAddress() { String IPAddress = null; try{ if(turnOf == ConfigParams.getIpAddresses().size() - 1){ - turnOf = 0; IPAddress = ConfigParams.getIpAddresses().get(turnOf); + turnOf = 0; + } else{ IPAddress = ConfigParams.getIpAddresses().get(turnOf); @@ -84,4 +85,4 @@ private synchronized String getIPAddress() { } -} \ No newline at end of file +}