Add TTFB timeout

This commit is contained in:
Disassembler 2018-11-01 16:24:23 +01:00
parent dd5396ae4b
commit 48ef45e487
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

View File

@ -50,7 +50,7 @@ class AppMgr:
self.lock = Lock() self.lock = Lock()
def get_repo_resource(self, url, stream=False): 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): def fetch_online_packages(self):
# Fetches and verifies online packages. Can raise InvalidSignature # Fetches and verifies online packages. Can raise InvalidSignature