mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2026-01-31 14:51:15 +03:00
Merge pull request #163 from dmunozv04/refresh-auth-after-disconnect
Refresh auth after every disconnect
This commit is contained in:
@@ -52,13 +52,13 @@ class DeviceListener:
|
|||||||
# Main subscription loop
|
# Main subscription loop
|
||||||
async def loop(self):
|
async def loop(self):
|
||||||
lounge_controller = self.lounge_controller
|
lounge_controller = self.lounge_controller
|
||||||
|
while not self.cancelled:
|
||||||
while not lounge_controller.linked():
|
while not lounge_controller.linked():
|
||||||
try:
|
try:
|
||||||
self.logger.debug("Refreshing auth")
|
self.logger.debug("Refreshing auth")
|
||||||
await lounge_controller.refresh_auth()
|
await lounge_controller.refresh_auth()
|
||||||
except:
|
except:
|
||||||
await asyncio.sleep(10)
|
await asyncio.sleep(10)
|
||||||
while not self.cancelled:
|
|
||||||
while not (await self.is_available()) and not self.cancelled:
|
while not (await self.is_available()) and not self.cancelled:
|
||||||
await asyncio.sleep(10)
|
await asyncio.sleep(10)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user