fix(pulse): ignore stale context callbacks
1749631179036d73e074d10188ded9aa475a795c
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 973dbf7e8037
bugabingas pi extensions
1749631179036d73e074d10188ded9aa475a795c
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+20 / −4 text lines
+20 / −4 text lines
setStatus(ctx); // Captured ctx from the timer closure can be invalidated by // ctx.reload() between ticket check and use; next session_start // installs a fresh timer with a fresh ctx, so just bail. if (typeof ctx.isIdle === "function") { let idle: boolean; try { idle = ctx.isIdle(); } catch { return; } if (!idle) { setStatus(ctx); return; }