ashbyb / Twitch.TV.Stream.Assistant

A tool that performs automation of a number of tasks that aid streaming on Twitch.tv. Runs an IRC bot, tracks current viewers, moderates the chat, and more.
8 stars 0 forks source link

Hang on Bot authentication. Consider workaround #5

Open ashbyb opened 11 years ago

ashbyb commented 11 years ago

This IRC library doesn't communicate what the heck is going on down there. A lot of time it will hang and not connect. Then you just try again (making no changes) and everything now works. What? Come on!

To fix this, a connection timeout would be nice but I don't see one. There was some sort of connection interval but it doesn't come into play until connected initially.

I think I can fix it by going into the code. I was rummaging around in there and I see what is being called. The thing is, changing the library code means it will only work for me and not for all other developers.

Not sure what to do. I may put in my own system where if no success seen within x seconds it will kill the bot's thread entirely and make another. Basically, make my own timeout at the higher level since it isn't exposed to me from the lower level.

Hmmm.

ashbyb commented 11 years ago

Update again.

See this: http://community.justin.tv/forums/showthread.php?t=15807

The server has been going up and down a lot lately. So I guess this is partially why things were so annoying.

I went in and edited the IRC core files to print some debugging statements. I am not sure what to do since this won't exist for others.

The thing is, if it works, it works right away. I should implement a cancel button and let the user decide if the system is failing or not? Sounds like a crappy idea.

Hmm

ashbyb commented 11 years ago

I see how to catch a bad socket connection. The error is not raised in the code, so I will need to overload the call or implement my own call so the error can be raised to me, so I can handle it.

The other issue is if you have a bad password. Currently everything just hangs.

I have created an issue on the IRC library's bitbucket page here: https://bitbucket.org/jaraco/irc/issue/23/handle-invalid-irc-password

Let's see what they say.

ashbyb commented 10 years ago

A user named Jason got back to me with some ideas on how to move forward and get around this issue. When I am able to work on the project, I will use his input.