1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Per-profile retry / auto-reconnect state.
//!
//! Replaces the single-slot `retry_count` + `retry_profile_idx` +
//! `auto_reconnect_profile` triple on `VpnRuntime` with a
//! `HashMap<ProfileId, RetryState>` (`VpnRuntime::retry_state`) so each
//! tunnel's retry is independent — a connect-failure on profile A no
//! longer overwrites or blocks an auto-reconnect on profile B.
//!
//! Plan P5b U-P5b-1: per-profile retry. See
//! `docs/plans/2026-05-30-002-refactor-retire-legacy-connectionstate-plan.md`.
/// Per-profile retry attempt bookkeeping.
///
/// The `HashMap` key (a `ProfileId`) identifies the profile; this struct
/// carries the attempt number, the original profile index (preserved so
/// the legacy `Message::RetryConnect { idx, .. }` can still locate the
/// profile after a sort reorder), and whether the retry was triggered
/// by an unexpected drop (auto-reconnect) vs a user-initiated connect
/// that failed.