Bug
In streamdl.go, the rate-limit retry logic for live streams uses a nested else-if chain that makes the "Rate Limited Thrice" branch unreachable. After the second retry fails with rate limiting, the third else if err.Error() == "rate limited" can never execute because it follows a different else if that would catch non-rate-limit errors.
Flagged by CodeRabbit on PR #551.
Fix
Replace the nested else-if chain with an explicit retry loop (up to 3 attempts) with backoff sleeps.
Bug
In
streamdl.go, the rate-limit retry logic for live streams uses a nested else-if chain that makes the "Rate Limited Thrice" branch unreachable. After the second retry fails with rate limiting, the thirdelse if err.Error() == "rate limited"can never execute because it follows a differentelse ifthat would catch non-rate-limit errors.Flagged by CodeRabbit on PR #551.
Fix
Replace the nested else-if chain with an explicit retry loop (up to 3 attempts) with backoff sleeps.