00pauln00 / niova-core

Other
3 stars 1 forks source link

Service discovery ncpc retry mechanism #282

Closed ashwini-8 closed 2 years ago

ashwini-8 commented 2 years ago

_, 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.