This looks like a part of problems already discussed here but let me add my issue.
I’m running mobile app with 5K+ active users daily. ~99% of the users are having issue with tweets stream. I’m managing stream lifetime by looking for it’s end. This is my C# code for it.
using (var stream = await _client.GetStreamAsync(new Uri("https://userstream.twitter.com/1.1/user.json?stringify_friend_id=true")))
{
using (var streamReader = new StreamReader(stream))
{
while (!streamReader.EndOfStream) { ... }
}
}
This code was working for the last year with no major issues. And know I’m getting end of stream in 1 or 3 minutes after opening it. Trying to reopen will return 420 error even if 5+ minutes are passed.