Files
MeshCore-mqtt-observer/src/helpers
agessaman eca1f2c0dc fix(mqtt): scale JWT renewal buffer with token lifetime
The token's exp claim and the renewal schedule derive from the same
value, so the flat 60 s RENEWAL_BUFFER was the entire margin between
proactive re-auth and the broker enforcing exp on the live session -
one failed renewal attempt (60 s throttle) or a minute of clock skew
lost the race, seen as clean-FIN disconnects (tls=0x8008) on the waev
preset, whose 55-minute tokens are the only ones short enough to hit
enforcement. Buffer is now lifetime/10 clamped to [60 s, 300 s], and
the disconnect-now threshold uses the same value so every renewal is
a proactive reconnect on the device's schedule; waev re-auths 10 min
before its real 60-minute TTL with ~5 retry windows.

Document why waev's preset claims 3300 s against the broker's real
3600 s TTL: the 5-minute claim-side gap protects token acceptance
against fast device clocks, which the renewal buffer cannot do.
2026-07-10 19:41:41 -07:00
..
2025-06-25 11:00:24 +02:00
2026-06-01 19:04:42 +10:00
2026-06-01 19:04:42 +10:00
2025-06-30 03:46:18 +02:00
2026-02-18 22:32:01 +07:00
2026-04-18 21:32:41 +10:00
2026-04-17 14:38:03 +10:00