Reworked the userclient with possibilities

Revoked token was actually broken, handle access schedule better,
restart/start properly. This is to stabilize things.
This commit is contained in:
angelblue05 2015-05-13 23:48:35 -05:00
parent 696586e952
commit 11e4a70e25
4 changed files with 51 additions and 21 deletions

View file

@ -28,6 +28,7 @@ class WebSocketThread(threading.Thread):
_shared_state = {}
doUtils = DownloadUtils()
clientInfo = ClientInformation()
KodiMonitor = KodiMonitor.Kodi_Monitor()
addonName = clientInfo.getAddonName()
@ -258,10 +259,14 @@ class WebSocketThread(threading.Thread):
on_close = self.on_close)
self.client.on_open = self.on_open
self.doUtils.postCapabilities(deviceId)
while not self.KodiMonitor.abortRequested():
self.client.run_forever()
if WINDOW.getProperty("Server_online") == "true":
# Server came back online, repost capabilities
self.doUtils.postCapabilities(deviceId)
self.client.run_forever()
if (self.keepRunning):
# Server is not online