Skip to content

fix: unreachable rate-limit retry branch in live stream tick loop #555

@biodrone

Description

@biodrone

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions