_, err := handler.pickServer(service)
if err != nil {
for i:=0; i<= serviceRetry; i++ {
here in this code first we are trying to pick server if error comes then only it goes into the for loop,
looping for n+1 times will be fine i guess since i am checking everytime if err is nil then exit this for loop.
_, err := handler.pickServer(service) if err != nil { for i:=0; i<= serviceRetry; i++ { here in this code first we are trying to pick server if error comes then only it goes into the for loop, looping for n+1 times will be fine i guess since i am checking everytime if err is nil then exit this for loop.