cross-tab-worker-databus 0.20.20 → 0.20.22

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;
@@ -1714,6 +1715,8 @@ var CrossTabDataBus = class {
1714
1715
  this.pendingStop = null;
1715
1716
  this.lastError = null;
1716
1717
  this.activeConfig = void 0;
1718
+ this.recoveryAttempt = 0;
1719
+ this.recoveryExhausted = false;
1717
1720
  this.updateStatus("disconnected");
1718
1721
  }
1719
1722
  }
@@ -1924,7 +1927,10 @@ var CrossTabDataBus = class {
1924
1927
  this.lastRecoveryAt = now;
1925
1928
  const attempt = ++this.recoveryAttempt;
1926
1929
  if (attempt > this.recoveryMaxAttempts) {
1927
- this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: this.recoveryMaxAttempts, outcome: "exhausted" });
1930
+ if (!this.recoveryExhausted) {
1931
+ this.recoveryExhausted = true;
1932
+ this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: this.recoveryMaxAttempts, outcome: "exhausted" });
1933
+ }
1928
1934
  return;
1929
1935
  }
1930
1936
  this.trace.event({ type: "reliability", operation: "transport_recovery", attempt, outcome: "scheduled" });
@@ -2038,6 +2044,7 @@ var CrossTabDataBus = class {
2038
2044
  if (traceAttempt !== void 0) {
2039
2045
  this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: traceAttempt, outcome: "succeeded" });
2040
2046
  this.recoveryAttempt = 0;
2047
+ this.recoveryExhausted = false;
2041
2048
  }
2042
2049
  if (this.startPromise === opening) this.startPromise = null;
2043
2050
  },