From cb9833b134d91a0def751bf2183e49da9efdc9d6 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Tue, 29 Mar 2016 10:51:32 -0700 Subject: [PATCH] Remove useless comment residual from decomposing functions --- consul/server_manager/server_manager.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/consul/server_manager/server_manager.go b/consul/server_manager/server_manager.go index c8070ed05..24844b0f9 100644 --- a/consul/server_manager/server_manager.go +++ b/consul/server_manager/server_manager.go @@ -162,7 +162,6 @@ func (sc *serverConfig) cycleServer() (servers []*server_details.ServerDetails) func (sc *serverConfig) removeServerByKey(targetKey *server_details.Key) { for i, s := range sc.servers { if targetKey.Equal(s.Key()) { - // Delete the target server copy(sc.servers[i:], sc.servers[i+1:]) sc.servers[len(sc.servers)-1] = nil sc.servers = sc.servers[:len(sc.servers)-1] @@ -173,7 +172,6 @@ func (sc *serverConfig) removeServerByKey(targetKey *server_details.Key) { // shuffleServers shuffles the server list in place func (sc *serverConfig) shuffleServers() { - // Shuffle server list for i := len(sc.servers) - 1; i > 0; i-- { j := rand.Int31n(int32(i + 1)) sc.servers[i], sc.servers[j] = sc.servers[j], sc.servers[i] @@ -456,7 +454,6 @@ func (sm *ServerManager) Start() { for { select { case <-sm.rebalanceTimer.C: - //sm.logger.Printf("[INFO] server manager: Rebalancing server connections") sm.RebalanceServers() sm.refreshServerRebalanceTimer()