Skip to content

Commit

Permalink
Shorter sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch authored and Megan Wilhite committed May 19, 2022
1 parent cd5905f commit c4593b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/modules/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -2094,11 +2094,11 @@ def fqdns():
fqdns = set()

def _lookup_fqdn(ip):
# Random sleep between 0.025 and 0.050 to avoid hitting
# Random sleep between 0.005 and 0.025 to avoid hitting
# the GLIBC race condition.
# For more info, see:
# https://sourceware.org/bugzilla/show_bug.cgi?id=19329
time.sleep(random.randint(25, 50) / 1000)
time.sleep(random.randint(5, 25) / 1000)
try:
return [socket.getfqdn(socket.gethostbyaddr(ip)[0])]
except socket.herror as err:
Expand Down

0 comments on commit c4593b8

Please sign in to comment.