Skip to content

Commit

Permalink
Specify defaultcase for dashboard address
Browse files Browse the repository at this point in the history
Iff the dashboard should listen to all interfaces this should be expressed here since empty strings should respect the given host argument
  • Loading branch information
maldag committed Sep 10, 2024
1 parent 9ffcb8d commit 9cd91a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion distributed/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,13 @@ def start_http_server(
self.http_server = HTTPServer(self.http_application, ssl_options=ssl_options)

http_addresses = clean_dashboard_address(dashboard_address or default_port)

for http_address in http_addresses:
# Handle default case for dashboard address
# In case dashboard_address is given, e.g. ":8787"
# the address is empty and it is intended to listen to all interfaces
if dashboard_address is not None and http_address["address"] == "":
http_address["address"] = "0.0.0.0"

if http_address["address"] is None or http_address["address"] == "":
address = self._start_address
if isinstance(address, (list, tuple)):
Expand Down

0 comments on commit 9cd91a7

Please sign in to comment.