summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@kernel.crashing.org>2023-03-09 16:52:20 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-11 20:49:22 +0000
commitf9b422152bdb40ed49e3310983faf7f5fe58b10d (patch)
tree5f16ad8ecc83eade43a820a7c26ad389b02fe659 /bitbake/lib
parent713f60559d897d5e73ca7b0d06f796a5a0e524e9 (diff)
downloadpoky-f9b422152bdb40ed49e3310983faf7f5fe58b10d.tar.gz
bitbake: wget.py: Add catch TimeoutError exception
We've observed TimeoutError exceptions during the sstate-cache mirror fetch, it appears that due to the number of (invalid) files requested the remote side is eventually dropping the connection (not closing it) which can result in a TimeoutError exception being sent, while rate it is different from the urllib.error.URLError or ConnectionResetError. (Bitbake rev: 6041b34740deee09ea65d705702555456a5e05d8) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 859b4f99e2..927487a0b6 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -385,6 +385,14 @@ class Wget(FetchMethod):
385 # debug for now to avoid spamming the logs in e.g. remote sstate searches 385 # debug for now to avoid spamming the logs in e.g. remote sstate searches
386 logger.debug2("checkstatus() urlopen failed: %s" % e) 386 logger.debug2("checkstatus() urlopen failed: %s" % e)
387 return False 387 return False
388 except TimeoutError as e:
389 if try_again:
390 logger.debug2("checkstatus: trying again")
391 return self.checkstatus(fetch, ud, d, False)
392 else:
393 # debug for now to avoid spamming the logs in e.g. remote sstate searches
394 logger.debug2("checkstatus() urlopen TimeoutError: %s" % e)
395 return False
388 396
389 return True 397 return True
390 398