From e05bc6e1263cf151a2e8a751f3924c73085707f1 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 30 Apr 2017 17:45:45 +0200 Subject: [PATCH] Increase timeouts for PMS - Fixes #283 --- resources/lib/PlexAPI.py | 4 +--- resources/lib/PlexFunctions.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 27e13846..c80e6992 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -255,7 +255,6 @@ class PlexAPI(): """ Checks connection to a Plex server, available at url. Can also be used to check for connection with plex.tv. - Will check up to 3x until reply with False Override SSL to skip the check by setting verifySSL=False if 'None', SSL will be checked (standard requests setting) @@ -284,14 +283,13 @@ class PlexAPI(): url = url + '/library/onDeck' log.debug("Checking connection to server %s with verifySSL=%s" % (url, verifySSL)) - # Check up to 3 times before giving up count = 0 while count < 1: answer = self.doUtils(url, authenticate=False, headerOptions=headerOptions, verifySSL=verifySSL, - timeout=4) + timeout=10) if answer is None: log.debug("Could not connect to %s" % url) count += 1 diff --git a/resources/lib/PlexFunctions.py b/resources/lib/PlexFunctions.py index 9c1284e2..82e54cad 100644 --- a/resources/lib/PlexFunctions.py +++ b/resources/lib/PlexFunctions.py @@ -377,7 +377,7 @@ def GetMachineIdentifier(url): xml = downloadutils.DownloadUtils().downloadUrl('%s/identity' % url, authenticate=False, verifySSL=False, - timeout=4) + timeout=10) try: machineIdentifier = xml.attrib['machineIdentifier'] except (AttributeError, KeyError):