Skip to content

Commit

Permalink
Merge pull request #1496 from dmitrytokarev/patch-1
Browse files Browse the repository at this point in the history
Print valid URL when --web-host is not specified
  • Loading branch information
heyman authored Jul 30, 2020
2 parents a167d2b + d3d5e53 commit f5b89d7
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 @@ -235,13 +235,16 @@ def timelimit_stop():
if not options.headless and not options.worker:
# spawn web greenlet
protocol = "https" if options.tls_cert and options.tls_key else "http"
logger.info("Starting web interface at %s://%s:%s" % (protocol, options.web_host, options.web_port))
try:
if options.web_host == "*":
# special check for "*" so that we're consistent with --master-bind-host
web_host = ''
else:
web_host = options.web_host
if web_host:
logger.info("Starting web interface at %s://%s:%s" % (protocol, web_host, options.web_port))
else:
logger.info("Starting web interface at %s://0.0.0.0:%s (accepting connections from all network interfaces)" % (protocol, options.web_port))
web_ui = environment.create_web_ui(
host=web_host,
port=options.web_port,
Expand Down

0 comments on commit f5b89d7

Please sign in to comment.