Skip to content

Commit

Permalink
Merge pull request #1916 from EzR1d3r/fix-1915
Browse files Browse the repository at this point in the history
Fix issue #1915
  • Loading branch information
cyberw authored Nov 12, 2021
2 parents a50c79a + 731827e commit 3893974
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ def main():
logger.error("Credentials supplied with --web-auth should have the format: username:password")
sys.exit(1)
else:
if options.autostart:
logger.warning("Option --autostart is ignored for headless mode and worker process.")
web_ui = None

def assign_equal_weights(environment, **kwargs):
Expand All @@ -325,7 +327,8 @@ def stop_and_optionally_quit():
time.sleep(options.autoquit)
logger.info("--autoquit time reached, shutting down")
runner.quit()
web_ui.stop()
if web_ui:
web_ui.stop()
else:
logger.info("--autoquit not specified, leaving web ui running indefinitely")
else: # --headless run
Expand Down

0 comments on commit 3893974

Please sign in to comment.