From f25bc82b9b4a0772393c49509bf566ec3796c892 Mon Sep 17 00:00:00 2001 From: Wu Tingfeng Date: Mon, 1 Jun 2026 18:39:38 +0800 Subject: [PATCH] Set finite timeout for urlopen() call to prevent indefinite hangs. --- update_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update_plugins.py b/update_plugins.py index c2e8e72405..dc251466cb 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -65,7 +65,7 @@ def download_extract_replace(plugin_name, zip_path, temp_dir, source_dir): # Download and extract file in temp dir - with urllib.request.urlopen(zip_path) as req: + with urllib.request.urlopen(zip_path, timeout=60) as req: zip_f = zipfile.ZipFile(BytesIO(req.read())) zip_f.extractall(temp_dir) content_disp = req.headers.get("Content-Disposition")