geduldig / TwitterAPI

Minimal python wrapper for Twitter's REST and Streaming APIs
939 stars 263 forks source link

gracefully handling a stalled stream #210

Closed alexge233 closed 1 year ago

alexge233 commented 2 years ago

Hi,

I keep getting a Twitter stream stalled due to operational disconnect. I handle this with an error decorator, which then tries to reconnect using retry and some back off delay. However, when I do this, I eventually get a "This stream is currently at the maximum allowed connection limit" which as I understand, means I've been creating new connections, rather than killing and restarting the old one. What's the advised or suggested way to kill and destroy the previous stream connection, and then reconnect from scratch?

alexge233 commented 1 year ago

Agreed, feel free to close