projects
/
music-assistant-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86d4e75
)
Correctly select a free port (#1121)
author
Ivailo Hristov
<crownandthering@gmail.com>
Wed, 6 Mar 2024 08:11:46 +0000
(10:11 +0200)
committer
GitHub
<noreply@github.com>
Wed, 6 Mar 2024 08:11:46 +0000
(09:11 +0100)
Co-authored-by: Ivailo Hristov <ivailo.hristov@isenselabs.com>
music_assistant/common/helpers/util.py
patch
|
blob
|
history
diff --git
a/music_assistant/common/helpers/util.py
b/music_assistant/common/helpers/util.py
index a06cb8a01a64f9542dff6743eec24c3f7769374c..13334871748ca1cc75edaf27a90d86e61a84d7ce 100644
(file)
--- 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