Fix an issue with settings being saved too early
This commit is contained in:
1 parent
3bccbc45c3
commit
2f452ca045
2 files changed
+6
-3
No files matched your search
@@ -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())
|
||||
|
||||
Reference in new issue
Block a user