SpiderStrategies / node-tweet-stream

Node twitter module to hook into the public filter streaming, seamlessly updating the tracking keywords.
210 stars 43 forks source link

reconnect on timeout #12

Closed nkzawa closed 9 years ago

nkzawa commented 9 years ago

It seems that we have to reconnect when no data for 90 seconds according to the docs. We also had a similar issue with #11. I think this PR would solve it.

https://dev.twitter.com/streaming/overview/connecting#Stalls

If 90 seconds pass with no data received, including newlines, disconnect and reconnect immediately according to the backoff strategies in the next section.

jjmaceda commented 9 years ago

nice!! thanks!!

nathanbowser commented 9 years ago

@nkzawa There were other problems with the code. I cleaned things up here: https://github.com/SpiderStrategies/node-tweet-stream/pull/14

Can you give it a look?

nathanbowser commented 9 years ago

Closing in favor of https://github.com/SpiderStrategies/node-tweet-stream/pull/14

nkzawa commented 9 years ago

@nathanbowser ah so it was not so simple. Thank you anyway!

nathanbowser commented 9 years ago

1.4.2 is on npm.