Fix an issue with settings being saved too early

This commit is contained in:
DevilXD committed 2022-04-10 16:02:59 +02:00
1 parent 3bccbc45c3
commit 2f452ca045
2 files changed
+6 -3

No files matched your search

+2 -3
View File
@@ -102,9 +102,8 @@ class Twitch:
session, self._session = self._session, None
await session.close()
await self.websocket.stop()
# save other important files
self.settings.save() # settings
self.gui.save() # image cache
# save image cache
self.gui.save()
# wait at least half a second + whatever it takes to complete the closing
# this allows aiohttp to safely close the session
await asyncio.sleep(start_time + 0.5 - time())