refactor: Migrate retry handeling form backoff to tryhard
fix: retry 502 status without delay in control connection
At some sites the status code returned by the proxy on timeout is 504 instead of 502 leading us to wait a minute before trying to reconnect.
But because 502 might also indicate a permanent problem with the network we don't want to spam the proxy as fast as possible with requests which is why I introduced a counter which keeps track of how many times we hit such a status code and if its more than 10 times in the last minute we retry only every minute.
backoff
totryhard
At some sites the status code returned by the proxy on timeout is 504 instead of 502 leading us to wait a minute before trying to reconnect. But because 502 might also indicate a permanent problem with the network we don't want to spam the proxy as fast as possible with requests which is why I introduced a counter which keeps track of how many times we hit such a status code and if its more than 10 times in the last minute we retry only every minute.