Merge pull request #39424 from twangboy/win_fix_dos

Fix problem with too many connection attempts in Windows
This commit is contained in:
Mike Place 2017-02-15 11:51:34 -07:00 committed by GitHub
commit 881ebf2e93

View file

@ -534,6 +534,10 @@ class MinionBase(object):
opts['master_uri_list'].append(resolve_dns(opts)['master_uri'])
while True:
if attempts != 0:
# Give up a little time between connection attempts
# to allow the IOLoop to run any other scheduled tasks.
yield tornado.gen.sleep(opts['acceptance_wait_time'])
attempts += 1
if tries > 0:
log.debug('Connecting to master. Attempt {0} '
@ -588,6 +592,10 @@ class MinionBase(object):
if opts['random_master']:
log.warning('random_master is True but there is only one master specified. Ignoring.')
while True:
if attempts != 0:
# Give up a little time between connection attempts
# to allow the IOLoop to run any other scheduled tasks.
yield tornado.gen.sleep(opts['acceptance_wait_time'])
attempts += 1
if tries > 0:
log.debug('Connecting to master. Attempt {0} '