@bobfrankston/rmfmail 1.2.114 → 1.2.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/app.js CHANGED
@@ -699,6 +699,14 @@ function renderConnectTick() {
699
699
  const el = document.getElementById("status-sync");
700
700
  if (!el || activeConnects.size === 0)
701
701
  return;
702
+ // Staleness guard: if a done/failed event got lost (daemon restart,
703
+ // dropped IPC line) an entry would tick forever — expire at 10 min,
704
+ // well past any transport timeout.
705
+ const now = Date.now();
706
+ for (const [k, c] of activeConnects) {
707
+ if (now - c.startedAt > 600_000)
708
+ activeConnects.delete(k);
709
+ }
702
710
  // Show the LONGEST-waiting attempt — that's the one worth staring at.
703
711
  let worst = null;
704
712
  for (const c of activeConnects.values()) {