voloko / twitter-stream

Twitter realtime API client
MIT License
233 stars 81 forks source link

Call-back for when no data is received for 90 seconds #32

Closed mgartner closed 12 years ago

mgartner commented 12 years ago

According to the Twitter Stream documentation, a client should reconnect to the stream if no data is received for 90 seconds: https://dev.twitter.com/docs/streaming-api/user-streams/suggestions#algorithms.

This change adds a call-back for when this event happens, where the user can then determine to reconnect, or do any desired behavior. Code was borrowed from #16. Includes a test case.

rud commented 12 years ago

Looks good, all specs still pass.