The code quality in the curl retry logic is pretty bad. It works, but it needs to be improved and reworked.