Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconnect on failure ? #6

Open
friggeri opened this issue Oct 5, 2010 · 4 comments
Open

reconnect on failure ? #6

friggeri opened this issue Oct 5, 2010 · 4 comments

Comments

@friggeri
Copy link

friggeri commented Oct 5, 2010

any plans to implement auto-reconnect on failure ?

@technoweenie
Copy link
Owner

I haven't had a need. I'm open for patches though.

@friggeri
Copy link
Author

friggeri commented Oct 5, 2010

I'd gladly do so, but any idea how this could be tested ?

long story short : I started logging the activity on some keywords and my app crashed after 20 hours. Fiddled and try to add some reconnect after a couple of seconds… Crashed after 24 hours or so without reconnecting. Anyways, the thing is : I obviously can't afford to wait a day or so until a crash to see if my handling of a disconnect is working… Of course, I could switch on/off my laptop's wifi, but then again, just wondering if you had any ideas of a more… elegant way of dealing with it.

@technoweenie
Copy link
Owner

What's causing the crashes? If it's just a loss of connection between Twitter and your script, write a stupid simple node server that emits random json, and run local tests with it dying.

I've talked to some people that ran into this, and they just had some code that would immediately catch and reopen the connection. I switched jobs after writing this, and have no real use for it anymore. All I can suggest is try some stuff out in a personal fork, and submit a pull request to get some in the community to look at it. If it works, I'll gladly take the patch.

Also, try and be polite to Twitter's servers: http://dev.twitter.com/pages/user_streams_suggestions#Failure :)

@cvee
Copy link
Contributor

cvee commented Nov 3, 2011

I've submitted a patch for this issue. Please let me know if you have any questions.

technoweenie added a commit that referenced this issue Apr 11, 2012
Fix for Issue #6 "reconnect on failure ?"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants