From 97a996055557ea6c4439e37069daf4b5f014f971 Mon Sep 17 00:00:00 2001 From: Ivailo Hristov Date: Wed, 6 Mar 2024 10:11:46 +0200 Subject: [PATCH] Correctly select a free port (#1121) Co-authored-by: Ivailo Hristov --- music_assistant/common/helpers/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/music_assistant/common/helpers/util.py b/music_assistant/common/helpers/util.py index a06cb8a0..13334871 100644 --- a/music_assistant/common/helpers/util.py +++ b/music_assistant/common/helpers/util.py @@ -158,7 +158,7 @@ async def select_free_port(range_start: int, range_end: int) -> int: """Check if port is in use.""" with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as _sock: try: - _sock.bind(("127.0.0.1", port)) + _sock.bind(("0.0.0.0", port)) except OSError: return True return False -- 2.34.1