When Twitter returns an error status (e.g., HTTP/1.1 500), it throws an error. However, when it reaches the end of the HTTP headers in parse_header_line, reset_timeouts resets the app's status, so if there's a similar error on the next reconnect, there's no record of consecutive failures and the timeout between retries never increases.
To address this issue, I changed line 178 from
reset_timeouts
to
reset_timeouts if @code == 200
Thus, it only resets the state when there's a successful connection.
(Sorry I don't know Ruby and Git well enough to implement this patch and test it myself.)
When Twitter returns an error status (e.g., HTTP/1.1 500), it throws an error. However, when it reaches the end of the HTTP headers in parse_header_line, reset_timeouts resets the app's status, so if there's a similar error on the next reconnect, there's no record of consecutive failures and the timeout between retries never increases.
To address this issue, I changed line 178 from
to
Thus, it only resets the state when there's a successful connection.
(Sorry I don't know Ruby and Git well enough to implement this patch and test it myself.)