Closed WectonicG closed 7 years ago
Not sure, let me do some testing.
I'm guessing it has to do with pubsub's WebSocket connection since that's been acting finicky and disconnecting randomly.
A fix for this would be very nice :D
I've recreated it, not sure why it's happening but I'm investigating fixes now.
Fixed. I tightened up my error handling of the randomly unstable Twitch pubsub socket, especially when sending messages. I also did a better job at clearing the pubsub internal state and disconnecting gracefully before reconnecting.
What was causing the error was not resetting "onclose" handler on the pubsub websocket connection to an empty function before closing it - this caused it to reopen immediately when I was already in the process of opening it. This caused a bunch of sockets to open until the max of ~100 or so was hit, which then started to massively leak memory in Chrome. This also caused the error you found, although you saw the early stages and probably not the memory leak.
thanks :)
I get randomly a error during runtime.
Uncaught Exception: Error: not opened at WebSocket.send
This comes everytime after max. 10 minutes.
Is this a known issue or what can I do against it?