Add watchdog timestamp for while loops

If server was offline or access was restricted, would create false
positives.
This commit is contained in:
angelblue05 2015-05-12 17:08:39 -05:00
parent d2a3f316be
commit b8d0289cb7

View file

@ -151,7 +151,10 @@ class Service():
self.warn_auth = False
while user.HasAccess == False:
WINDOW.setProperty("Emby_Service_Timestamp", str(int(time.time())))
user.hasAccess()
if self.KodiMonitor.waitForAbort(5):
# Abort was requested while waiting. We should exit
break
@ -160,6 +163,7 @@ class Service():
else:
# Wait until server becomes online or shut down is requested
while not self.KodiMonitor.abortRequested():
WINDOW.setProperty("Emby_Service_Timestamp", str(int(time.time())))
if user.getServer() == "":
pass