Merge pull request #1099 from Liametc/bugfix/1098_webserver_fix

Tray: Server uses 127.0.0.1 instead of localhost
This commit is contained in:
Jakub Trllo 2025-01-23 12:41:09 +01:00 committed by GitHub
commit 0cb1c26ae5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,7 @@ def find_free_port(
exclude_ports (list, tuple, set): List of ports that won't be
checked form entered range.
host (str): Host where will check for free ports. Set to
"localhost" by default.
"127.0.0.1" by default.
"""
if port_from is None:
port_from = 8079
@ -42,7 +42,7 @@ def find_free_port(
# Default host is localhost but it is possible to look for other hosts
if host is None:
host = "localhost"
host = "127.0.0.1"
found_port = None
while True:
@ -78,7 +78,7 @@ class WebServerManager:
self._log = None
self.port = port or 8079
self.host = host or "localhost"
self.host = host or "127.0.0.1"
self.on_stop_callbacks = []