(host, port)
| 34 | print(f"Updated {launch_file_path} with host: {host} and port: {port}") |
| 35 | |
| 36 | def is_port_in_use(host, port): |
| 37 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: |
| 38 | return s.connect_ex((host, port)) == 0 |
| 39 | |
| 40 | def setup_debug(is_main_process=True, max_retries=10, port_range=(10000, 20000)): |
| 41 | if is_main_process: |