fix: reduce reconnect backoff to 1s flat
Exponential backoff up to 300s made no sense with rotating Tor exits where each reconnect gets a fresh IP. Single 1s delay is sufficient. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -156,7 +156,7 @@ SASL EXTERNAL (cert + creds) > SASL PLAIN (creds) > NickServ IDENTIFY
|
||||
## Reconnect Backoff
|
||||
|
||||
```
|
||||
5s -> 10s -> 30s -> 60s -> 120s -> 300s (cap)
|
||||
1s (flat, no escalation)
|
||||
```
|
||||
|
||||
## PING Watchdog
|
||||
|
||||
@@ -57,14 +57,8 @@ Once probation passes without incident:
|
||||
On any disconnection, the bouncer reconnects with exponential backoff
|
||||
(configurable via `backoff_steps`):
|
||||
|
||||
| Attempt | Default Delay |
|
||||
|---------|---------------|
|
||||
| 1 | 5s |
|
||||
| 2 | 10s |
|
||||
| 3 | 30s |
|
||||
| 4 | 60s |
|
||||
| 5 | 120s |
|
||||
| 6+ | 300s |
|
||||
Reconnection delay is **1 second** (flat, no escalation). Each attempt gets a
|
||||
fresh random identity and potentially a different exit IP.
|
||||
|
||||
Each reconnection uses a fresh random identity.
|
||||
|
||||
@@ -321,7 +315,7 @@ captcha_poll_timeout = 120 # max seconds to wait for solve
|
||||
|
||||
# Connection tuning
|
||||
probation_seconds = 45 # post-connect watch period for k-lines
|
||||
backoff_steps = [5, 10, 30, 60, 120, 300] # reconnect delays
|
||||
backoff_steps = [1] # reconnect delay (seconds)
|
||||
nick_timeout = 10 # seconds to wait for nick change
|
||||
rejoin_delay = 3 # seconds before rejoin after kick
|
||||
http_timeout = 15 # per-request HTTP timeout
|
||||
|
||||
@@ -67,7 +67,7 @@ class BouncerConfig:
|
||||
|
||||
# Connection tuning
|
||||
probation_seconds: int = 45
|
||||
backoff_steps: list[int] = field(default_factory=lambda: [5, 10, 30, 60, 120, 300])
|
||||
backoff_steps: list[int] = field(default_factory=lambda: [1])
|
||||
nick_timeout: int = 10
|
||||
rejoin_delay: int = 3
|
||||
http_timeout: int = 15
|
||||
@@ -128,7 +128,7 @@ def load(path: Path) -> Config:
|
||||
captcha_poll_interval=bouncer_raw.get("captcha_poll_interval", 3),
|
||||
captcha_poll_timeout=bouncer_raw.get("captcha_poll_timeout", 120),
|
||||
probation_seconds=bouncer_raw.get("probation_seconds", 45),
|
||||
backoff_steps=bouncer_raw.get("backoff_steps", [5, 10, 30, 60, 120, 300]),
|
||||
backoff_steps=bouncer_raw.get("backoff_steps", [1]),
|
||||
nick_timeout=bouncer_raw.get("nick_timeout", 10),
|
||||
rejoin_delay=bouncer_raw.get("rejoin_delay", 3),
|
||||
http_timeout=bouncer_raw.get("http_timeout", 15),
|
||||
|
||||
@@ -151,7 +151,7 @@ channel_keys = { "#secret" = "hunter2" }
|
||||
cfg = load(_write_config(MINIMAL_CONFIG))
|
||||
b = cfg.bouncer
|
||||
assert b.probation_seconds == 45
|
||||
assert b.backoff_steps == [5, 10, 30, 60, 120, 300]
|
||||
assert b.backoff_steps == [1]
|
||||
assert b.nick_timeout == 10
|
||||
assert b.rejoin_delay == 3
|
||||
assert b.http_timeout == 15
|
||||
|
||||
Reference in New Issue
Block a user