From db41f2f1fc633164c67743889a4a40847eab2a00 Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 6 Oct 2014 00:39:56 +0800 Subject: [PATCH] Adjust transmission timeout for slower systems --- sickbeard/clients/generic.py | 2 +- sickbeard/clients/transmission.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sickbeard/clients/generic.py b/sickbeard/clients/generic.py index 2b4f1209..aaa6cef3 100644 --- a/sickbeard/clients/generic.py +++ b/sickbeard/clients/generic.py @@ -207,7 +207,7 @@ class GenericClient(object): def testAuthentication(self): try: - self.response = self.session.get(self.url, timeout=20, verify=False) + self.response = self.session.get(self.url, timeout=120, verify=False) except requests.exceptions.ConnectionError, e: return False, 'Error: ' + self.name + ' Connection Error' except (requests.exceptions.MissingSchema, requests.exceptions.InvalidURL): diff --git a/sickbeard/clients/transmission.py b/sickbeard/clients/transmission.py index 50fd4b50..e8482fe6 100644 --- a/sickbeard/clients/transmission.py +++ b/sickbeard/clients/transmission.py @@ -37,7 +37,8 @@ class TransmissionAPI(GenericClient): post_data = json.dumps({'method': 'session-get', }) try: - self.response = self.session.post(self.url, data=post_data.encode('utf-8'), verify=sickbeard.TORRENT_VERIFY_CERT) + self.response = self.session.post(self.url, data=post_data.encode('utf-8'), timeout=120, + verify=sickbeard.TORRENT_VERIFY_CERT) self.auth = re.search('X-Transmission-Session-Id:\s*(\w+)', self.response.text).group(1) except: return None