retry-needs-backoff-and-cap

Installation
SKILL.md

A retry loop with no brakes is a heater

A connection that retries immediately on every failure is fine while failures are rare and catastrophic when they are permanent. Hand it a credential the service will never accept and it becomes: connect, authenticate, get rejected, reconnect — thousands of times an hour, radio awake throughout, for as long as the app runs. Users report it as heat and battery drain, one of the least diagnosable bug reports there is, because nothing in the app looks busy.

Four independent brakes, all of which you need:

// adapted — names generalized; teardown, log lines, the close handler's code lookup and its other
// branches elided, and that handler shown taking its code as a parameter
private var currentDelay = INITIAL_DELAY
Installs
2
GitHub Stars
35
First Seen
6 days ago
retry-needs-backoff-and-cap — maxrave-dev/kotlin-footguns