Files
Karel Balej 2bc1bd9b68 app: prevent spinning the CPU while failing to reconnect
Commit d1854702d4 slightly modified the way a reconnection backoff was
calculated replacing an issue where aerc would stop trying after a while
with one where it will eventually start to issue reconnection attempts
with no delay in between, causing a high CPU usage.

This is because the backoff would eventually reach a value that cannot
be represented by time.Duration leading to negative and eventually zero
wait time.

Put a hard limit on the backoff so that it can be safely represented by
time.Duration. While at it, also simplify the code.

Link: https://lists.sr.ht/~rjarry/aerc-devel/patches/66028
Fixes: d1854702d4 ("account: move reconnection backoff logic to UI layer")
Changelog-fixed: Repeated reconnection failures will no longer cause
 aerc to start spinning the CPU.
Changelog-changed: A hard maximum of one day is now enforced for
 reconnection attempt delay, setting reconnect-maxwait to a higher value
 thus has no effect.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Simon Martin <simon@nasilyan.com>
2026-09-27 13:25:44 +02:00
..
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-03-07 19:48:38 +01:00
2026-07-28 17:42:39 +02:00
2024-10-08 12:45:21 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2023-10-10 11:37:56 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00
2026-07-28 17:42:39 +02:00