Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add retry for socket scanning with delay #3794

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fliepeltje
Copy link
Contributor

possibly closes #3761 and possibly closes #3358

@fliepeltje fliepeltje requested a review from lubien July 29, 2024 16:22
break
} else {
retries -= 1
time.Sleep(3 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also! @fliepeltje, something to ponder about: would you consider reducing the sleep time to 1 second for each retry?

  1. Pro: This will reduce wait time in case the services becomes reachable earlier than 3 seconds
  2. Con: You'll have to increase the number of retries though! Since the intended logic is that most services are reachable by 3 seconds, when reducing the sleep time to 1 second, the retries have to be increased to reach that 3 second mark. So that's a drawback, since that would increase requests made to the app right.

Also this is a very experimental question, with the aim of taking into consideration the wait time of users. But if 3 seconds is not that long, and is not any different from waiting 1 second, then I guess this comment don't need to considered even.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants