Use waitForAbort instead of sleep
also waitForAbort is in seconds not ms
This commit is contained in:
parent
5ffa40faf5
commit
d0c7246de0
2 changed files with 7 additions and 3 deletions
|
@ -302,7 +302,7 @@ class WebSocketThread(threading.Thread):
|
|||
self.client.run_forever()
|
||||
if(self.keepRunning):
|
||||
self.logMsg("Client Needs To Restart")
|
||||
if self.KodiMonitor.waitForAbort(10000):
|
||||
if self.KodiMonitor.waitForAbort(5):
|
||||
break
|
||||
|
||||
self.logMsg("Thread Exited")
|
||||
|
|
|
@ -68,7 +68,9 @@ class Service():
|
|||
|
||||
while not self.KodiMonitor.abortRequested():
|
||||
|
||||
xbmc.sleep(1000)
|
||||
if self.KodiMonitor.waitForAbort(1):
|
||||
# Abort was requested while waiting. We should exit
|
||||
break
|
||||
|
||||
if xbmc.Player().isPlaying():
|
||||
try:
|
||||
|
@ -120,7 +122,9 @@ class Service():
|
|||
if(libSync and countSync):
|
||||
startupComplete = True
|
||||
else:
|
||||
xbmc.sleep(10000)
|
||||
if self.KodiMonitor.waitForAbort(10):
|
||||
# Abort was requested while waiting. We should exit
|
||||
break
|
||||
|
||||
else:
|
||||
xbmc.log("Not authenticated yet")
|
||||
|
|
Loading…
Reference in a new issue