Galaxypedia-Wiki / ketchupbot-updater

epic galxy pedia updator
MIT License
1 stars 0 forks source link

Add exponential backoff to HttpClient #95

Closed smallketchup82 closed 2 months ago

smallketchup82 commented 3 months ago

Okay I originally tried to do this on my first run converting ketchupbot to c#. But I genuinely have no idea how to do this despite having done a fuck ton of research.

For now, HttpClient seems to use a timeout duration where, if it fails to connect for whatever reason, it'll wait for a period of time before throwing an exception. So it very well could be that backoff is just built into HttpClient?? I honestly don't know.

For now it seems to do the job, but I should definitely revisit this and confirm the workings of it.

smallketchup82 commented 3 months ago

This would probably have to be implemented using Polly

It might be wise to move towards using HttpClientFactory since it seems to be the best approach when looking for something like this?