Twitchbot Timesout

It looks like you’re using synchronous plain sockets - and the receive function blocks the thread. I assume that this is the underlying issue as you may be receiving less than 1024 bytes and thus never moving on.

I can’t say for sure, though.

While you can make it work, I would recommend to switch to WebSockets for more reliability and easier multithreading.

You can have a look at GitHub - Marenthyu/twitchChatAndOAuthExample: An Example / Reference Implementation of Twitch Authentication and Chat Message Handling. for an example.

Otherwise: catch the error where you’re currently just printing FUCK and check what that says exactly