aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-07-07 11:49:11 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2023-07-10 17:48:58 +0300
commit7fa09ecd1c7029ed6b05b190662b6a1051bf8d7a (patch)
tree64738cd5253136eacd52beba52f6bb27805b345e /mesonbuild/wrap
parent08972c1277a84d5003209fd13ab888e1f9bdb43d (diff)
downloadmeson-7fa09ecd1c7029ed6b05b190662b6a1051bf8d7a.zip
meson-7fa09ecd1c7029ed6b05b190662b6a1051bf8d7a.tar.gz
meson-7fa09ecd1c7029ed6b05b190662b6a1051bf8d7a.tar.bz2
wrap: detect network timeouts 20x faster
When downloading wrap content, we need to know at some point if the server is going to respond with "hello, yes, I'm here and I have data for you". The alternative is to sometimes infinitely hang. In commit 8f7781f1d6bf36c064b39e7d0794c686f1b78665 we added such a timeout, but using an extremely generously high number -- ten minutes. We don't need to wait this long just to find out if the other end exists, so decrease that time to 30 seconds, whch is still ludicrously generous but not quite as much so.
Diffstat (limited to 'mesonbuild/wrap')
-rw-r--r--mesonbuild/wrap/wrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 9e423ea..2b0a0ba 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -54,7 +54,7 @@ try:
except ImportError:
has_ssl = False
-REQ_TIMEOUT = 600.0
+REQ_TIMEOUT = 30.0
WHITELIST_SUBDOMAIN = 'wrapdb.mesonbuild.com'
ALL_TYPES = ['file', 'git', 'hg', 'svn']