cross-tab-worker-databus 0.20.20 → 0.20.21

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.
@@ -1316,6 +1316,7 @@ var CrossTabDataBus = class {
1316
1316
  // Monotonic attempt number within one runtime recovery sequence; reset once
1317
1317
  // a transport reopen succeeds so traces can correlate repeated failures.
1318
1318
  recoveryAttempt = 0;
1319
+ recoveryExhausted = false;
1319
1320
  // True while the tab is hidden so an in-flight transport start does not mark
1320
1321
  // the transport ready after suspendTransport() has stopped it.
1321
1322
  suspended = false;
@@ -1924,7 +1925,10 @@ var CrossTabDataBus = class {
1924
1925
  this.lastRecoveryAt = now;
1925
1926
  const attempt = ++this.recoveryAttempt;
1926
1927
  if (attempt > this.recoveryMaxAttempts) {
1927
- this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: this.recoveryMaxAttempts, outcome: "exhausted" });
1928
+ if (!this.recoveryExhausted) {
1929
+ this.recoveryExhausted = true;
1930
+ this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: this.recoveryMaxAttempts, outcome: "exhausted" });
1931
+ }
1928
1932
  return;
1929
1933
  }
1930
1934
  this.trace.event({ type: "reliability", operation: "transport_recovery", attempt, outcome: "scheduled" });
@@ -2038,6 +2042,7 @@ var CrossTabDataBus = class {
2038
2042
  if (traceAttempt !== void 0) {
2039
2043
  this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: traceAttempt, outcome: "succeeded" });
2040
2044
  this.recoveryAttempt = 0;
2045
+ this.recoveryExhausted = false;
2041
2046
  }
2042
2047
  if (this.startPromise === opening) this.startPromise = null;
2043
2048
  },