Sleep when checking connection failed

This commit is contained in:
tomkat83 2016-04-05 17:03:34 +02:00
parent 953a862c9d
commit 9929ab2eb5

View file

@ -375,11 +375,13 @@ class PlexAPI():
"Header: %s Error message: %s" "Header: %s Error message: %s"
% (url, header, e), 0) % (url, header, e), 0)
count += 1 count += 1
xbmc.sleep(1000)
continue continue
except requests.exceptions.ReadTimeout: except requests.exceptions.ReadTimeout:
self.logMsg("Server timeout reached for Url %s with header %s" self.logMsg("Server timeout reached for Url %s with header %s"
% (url, header), 0) % (url, header), 0)
count += 1 count += 1
xbmc.sleep(1000)
continue continue
else: else:
result = answer.status_code result = answer.status_code