I'm trying to create an ongoing stream on a service, that follows user id's. It loops through correctly until around the third re-connection, when it throws a 420 rate limit exception. I have a 2 minute pause before every new re-connect, and as the documentation
states, the time period will double from one minute and so on for every re connection.
- Is there any way to update the following userlist without loosing the connection?
- What is the total minute span for when this "double time on re-connect"? So that I would be sure to avoid this error?
Here is my code, where I flag the CloseStream bool value to close the stream and get new users.
(from strm in Context.Streaming
where strm.Type == StreamingType.Filter &&
strm.Follow == String.Join(",", userId)
.StartAsync(async strm =>
catch (TwitterQueryException ex)
StatusCode = Convert.ToInt32(ex.StatusCode);
Logger.Error("Streaming was interrupted due to exceeded re-connection attempts within the timespan " + ex.ErrorCode, ex);