You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ji...@apache.org on 2025/07/11 19:33:25 UTC

(couchdb) 01/01: Add timeout to `urlopen()` to prevent hanging

This is an automated email from the ASF dual-hosted git repository.

jiahuili430 pushed a commit to branch add-timeout-to-prevent-hanging
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 580459432e7d4bfbdcc3805ca070255d4f839225
Author: Jiahui Li <li...@gmail.com>
AuthorDate: Fri Jul 11 13:19:39 2025 -0500

    Add timeout to `urlopen()` to prevent hanging
---
 dev/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev/run b/dev/run
index 478fb2ae9..bece3e6f3 100755
--- a/dev/run
+++ b/dev/run
@@ -975,7 +975,7 @@ def check_node_alive(url, user, pswd):
 
     for _ in range(10):
         try:
-            with contextlib.closing(urlopen(url)):
+            with contextlib.closing(urlopen(url, timeout=1)):
                 pass
         except Exception as exc:
             error = exc