Merge pull request #8 from GenericPseudonym/master

Fix unhandled exception for games with >400 channels
This commit is contained in:
DevilXD authored and GitHub committed 2022-02-12 09:04:11 +01:00
commit c1f1acc6aa
2 files changed
+11

No files matched your search

+1
View File
@@ -1,2 +1,3 @@
aiohttp>2.0,<4.0
pystray
websockets
+10
View File
@@ -49,6 +49,8 @@ from constants import (
WebsocketTopic,
)
from exceptions import MinerException
if TYPE_CHECKING:
from gui import LoginForm
from main import ParsedArgs
@@ -293,7 +295,15 @@ class Twitch:
)
for channel_id in self.channels
]
try:
self.websocket.add_topics(topics)
except MinerException as err:
# don't panic if we have more topics than available sockets
# but still log an error
logger.error(err)
pass
# relink watching channel after cleanup,
# or stop watching it if it no longer qualifies
watching_channel = self.watching_channel.get_with_default(None)