When a connection drops and the node attempts to reconnect within the same second, the `last_attempt` timestamp written to the database is identitcal to the `last_success` timestamp due to the Unix time (seconds) precision loss. The `maintain_connections` logic filters eligible peers using the condition `last_success >= last_attempt`. Because the truncated timestamps are equal, this evaluates to true, causing the node to bypass the `CONNECTION_RETRY_DELTA` backoff. If the OS instantly rejects the dial attempt (e.g. `EHOSTUNREACH`), the node synchronously queues another connection attempt. This traps the reactor in an infinite `while` loop. Changing the condition to `last_success > last_attempt` ensures that a failed attempt in the same second correctly evaluates to false, forcing the node to respect the backoff timer and breaking the loop. |
||
|---|---|---|
| .. | ||
| fetcher | ||
| service | ||
| wire | ||
| worker | ||
| bounded.rs | ||
| deserializer.rs | ||
| fetcher.rs | ||
| lib.rs | ||
| service.rs | ||
| wire.rs | ||
| worker.rs | ||
