Add 10 seconds timeout for curl

This commit is contained in:
henryruhs
2025-01-06 01:32:38 +01:00
parent 749abc3406
commit bb32135af2

View File

@@ -15,7 +15,7 @@ from facefusion.typing import DownloadProvider, DownloadSet
def open_curl(args : List[str]) -> subprocess.Popen[bytes]:
commands = [ shutil.which('curl'), '--silent', '--insecure', '--location' ]
commands = [ shutil.which('curl'), '--silent', '--insecure', '--location', '--connect-timeout', '10' ]
commands.extend(args)
return subprocess.Popen(commands, stdin = subprocess.PIPE, stdout = subprocess.PIPE)