From 48ef45e487764cd3b0825432eca68b92a8daab0e Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 1 Nov 2018 16:24:23 +0100 Subject: [PATCH] Add TTFB timeout --- usr/lib/python3.6/vmmgr/appmgr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/lib/python3.6/vmmgr/appmgr.py b/usr/lib/python3.6/vmmgr/appmgr.py index 21dabff..25af0b7 100644 --- a/usr/lib/python3.6/vmmgr/appmgr.py +++ b/usr/lib/python3.6/vmmgr/appmgr.py @@ -50,7 +50,7 @@ class AppMgr: self.lock = Lock() def get_repo_resource(self, url, stream=False): - return requests.get('{}/{}'.format(self.conf['repo']['url'], url), auth=(self.conf['repo']['user'], self.conf['repo']['pwd']), stream=stream) + return requests.get('{}/{}'.format(self.conf['repo']['url'], url), auth=(self.conf['repo']['user'], self.conf['repo']['pwd']), timeout=5, stream=stream) def fetch_online_packages(self): # Fetches and verifies online packages. Can raise InvalidSignature