Maybe it is too much to say every time. I have several logs of failed attempts to reconnect, but the program doesn't show logs of successful attempts.
After digging a bit into the code, I noticed this:
When the program tries to reconnect, it closes the connection to the socket.
It then reconnects and expects to receive a nonce. But the task that handles the received messages does not work anymore because the connection was closed:
Hi!
Maybe it is too much to say every time. I have several logs of failed attempts to reconnect, but the program doesn't show logs of successful attempts. After digging a bit into the code, I noticed this:
When the program tries to reconnect, it closes the connection to the socket.
https://github.com/Teekeks/pyTwitchAPI/blob/0c2d5c1b520d25a52c308dcd4265880b57876f47/twitchAPI/pubsub.py#L174-L178
It then reconnects and expects to receive a nonce. But the task that handles the received messages does not work anymore because the connection was closed:
https://github.com/Teekeks/pyTwitchAPI/blob/0c2d5c1b520d25a52c308dcd4265880b57876f47/twitchAPI/pubsub.py#L296-L299
I think it works fine at startup because it runs the
self.__connect
method before theself.__task_receive
method.https://github.com/Teekeks/pyTwitchAPI/blob/0c2d5c1b520d25a52c308dcd4265880b57876f47/twitchAPI/pubsub.py#L241-L250
Please check if this makes sense. Maybe it was a problem with my connection and theres is something im not seeing.
Thanks for this library btw. It's helping a lot!