Open duffy356 opened 2 years ago
I assume this has not been resolved? I do believe this is an issue I'm encountered now..
when my PC is put to sleep for more than a few minutes then when coming back online the chatbot is no longer connected.. although some parts of it do seem to still be active which is a bit odd.
Just to verify, #364 does not resolve this, correct?
EDIT: It does not.
I’m having the same issue.
I have encountered an issue with reconnects or changes of the network while running the bot.
When the network connection is dead for less than one minute, the cached connections from the websocket may still work, but when the network is offline for more than 5 minutes, then the websocket will reconnect, but the previous connections from the websocket._cache dictionary are outdated and dead. The Library will not connect automatically to the previously connected channels.
I could fix it for my concrete usage with an overloaded version of the following method in Client's subclass:
It would be nice to automatically reconnect to the connected channels from the websocket's cache or at least remove the entries from the cache, so that a new call of join_channels("a") will allow the library to make a new connection to channel "a".