# `ZenWebsocket.Client.Retry`
[🔗](https://github.com/ZenHive/zen_websocket/blob/v0.8.0/lib/zen_websocket/client/retry.ex#L1)

Connection-error retry state machine for `ZenWebsocket.Client`.

Attempt-identity timers live in `ZenWebsocket.Client.Connection`; this module
applies retry policy to reconnect immediately, schedule backoff, or stop.

# `continue_failed`

```elixir
@spec continue_failed(map(), term()) :: {:noreply, map()} | {:stop, term(), map()}
```

Handles a failed open by cleaning up and maybe scheduling a retry.

# `handle_connection_error`

```elixir
@spec handle_connection_error(map(), term()) ::
  {:noreply, map()} | {:stop, term(), map()}
```

Cleans up a failed connection and retries or stops according to policy.

# `handle_connection_timeout`

```elixir
@spec handle_connection_timeout(map()) :: {:noreply, map()} | {:stop, term(), map()}
```

Times out the in-flight connection attempt when the attempt identity matches.

# `handle_retry_reconnect`

```elixir
@spec handle_retry_reconnect(map()) ::
  {:noreply, map()}
  | {:noreply, map(), {:continue, :reconnect}}
  | {:stop, term(), map()}
```

Handles a scheduled reconnect tick, stopping when retries are exhausted.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
