fix multiclient trying to webhost on the same port it determined as web_ui socket
This commit is contained in:
parent
2338d25b39
commit
d9e7248ebc
|
@ -1309,7 +1309,7 @@ async def main():
|
||||||
if not args.disable_web_ui:
|
if not args.disable_web_ui:
|
||||||
# Find an available port on the host system to use for hosting the websocket server
|
# Find an available port on the host system to use for hosting the websocket server
|
||||||
while True:
|
while True:
|
||||||
port = randrange(5000, 5999)
|
port = randrange(49152, 65535)
|
||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
||||||
if not sock.connect_ex(('localhost', port)) == 0:
|
if not sock.connect_ex(('localhost', port)) == 0:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue