I’m trying to have a python script connect to twitch chat through a websocket and interact with users from what messages they send. Y’know, basic bot stuff.
Everything works perfectly fine for the first ten minutes or so. I connect to the IRC, I’m receiving messages properly, and everything is going smoothly. However, after about 10-15 minutes, I just start getting thousands of blank messages from the websocket every second. I thought this was because I wasn’t replying to the PING messages I was getting, but every variation of reply to the PINGs I could think of didn’t work, and I still get flooded with empty messages.
I’ve also tried waiting for an empty message and then reconnecting, but that throws an error as well, saying “A request to send or recieve data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied” [WinError 10057]. I have no idea why this error is coming up, because I am supplying the websocket with the IP and Port of the IRC.
I’m at a total loss as to what to do now. I’ve tried everything I can think of to get this working and I can’t find anything else even remotely close to this issue out there on the internet save for a single post on this forum from ~2 years ago that doesn’t include a solution.
I tried adding something similar where my code will wait roughly 3 minutes for a ping, and then send it’s own, but I still get the same result. I’ve been having this issue for over a week now, so if it’s a server issue I’d be kinda surprised.
Try your code on another server?
Ask your server provider about routing issues (some might not even allow IRC type stuff running and thats the issue you are having it’s getting shutdown by the provider)?
If you use digital ocean, they seem to have routing issues quite often
All of this is being run off a desktop PC, and will eventually be ran off a raspberry pi. The only thing between me and twitch that might be interfering is PiHole, but I checked the Query and nothing is being blocked pertaining to this application. So I can say with a good degree of certainty that IRC is being allowed.
I use AT&T for my ISP, you think it might be because of the issues they’ve been experiencing since that whole christmas fiasco in Tenessee? Some of my other stuff was affected like my cell service.
(Not that I expect you to know everything about their routing, just curious if it’s likely enough to warrant a phonecall)