Skip to content

Commit

Permalink
Fix issue locustio#1915
Browse files Browse the repository at this point in the history
Fix the case when locust stops with exception in headless mode with autoquit != -1
  • Loading branch information
EzR1d3r authored Oct 26, 2021
1 parent 1ffe8c3 commit 292b4d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,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 292b4d1

Please sign in to comment.