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.
@@ -1291,6 +1291,7 @@ var CrossTabDataBus = class {
1291
1291
  // Monotonic attempt number within one runtime recovery sequence; reset once
1292
1292
  // a transport reopen succeeds so traces can correlate repeated failures.
1293
1293
  recoveryAttempt = 0;
1294
+ recoveryExhausted = false;
1294
1295
  // True while the tab is hidden so an in-flight transport start does not mark
1295
1296
  // the transport ready after suspendTransport() has stopped it.
1296
1297
  suspended = false;
@@ -1689,6 +1690,8 @@ var CrossTabDataBus = class {
1689
1690
  this.pendingStop = null;
1690
1691
  this.lastError = null;
1691
1692
  this.activeConfig = void 0;
1693
+ this.recoveryAttempt = 0;
1694
+ this.recoveryExhausted = false;
1692
1695
  this.updateStatus("disconnected");
1693
1696
  }
1694
1697
  }
@@ -1899,7 +1902,10 @@ var CrossTabDataBus = class {
1899
1902
  this.lastRecoveryAt = now;
1900
1903
  const attempt = ++this.recoveryAttempt;
1901
1904
  if (attempt > this.recoveryMaxAttempts) {
1902
- this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: this.recoveryMaxAttempts, outcome: "exhausted" });
1905
+ if (!this.recoveryExhausted) {
1906
+ this.recoveryExhausted = true;
1907
+ this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: this.recoveryMaxAttempts, outcome: "exhausted" });
1908
+ }
1903
1909
  return;
1904
1910
  }
1905
1911
  this.trace.event({ type: "reliability", operation: "transport_recovery", attempt, outcome: "scheduled" });
@@ -2013,6 +2019,7 @@ var CrossTabDataBus = class {
2013
2019
  if (traceAttempt !== void 0) {
2014
2020
  this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: traceAttempt, outcome: "succeeded" });
2015
2021
  this.recoveryAttempt = 0;
2022
+ this.recoveryExhausted = false;
2016
2023
  }
2017
2024
  if (this.startPromise === opening) this.startPromise = null;
2018
2025
  },