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

Checking Disconnect #50

Open ilrein opened 7 years ago

ilrein commented 7 years ago

Hello, thanks for the awesome lil' lib!

I am just wondering how stream disconnect is handled. Looks like there is a test that handles reconnecting a stream if its disconnecting. Also there appears to be a few mentions of 'disconnect' (https://dev.twitter.com/streaming/overview/messages-types#disconnect_messages)

but not much as far as docs explaining it. Since spending a fair bit of time in development I've noticed reconnecting to streams can be unpredictable and I want to make sure this doesn't transfer to user experience.

Is there any sort of access to the 'disconnect' that I can check programmatically?

I need to check the stream status in case the users changes the stream, since there is a chance there could be no feedback and no errors.