cross-tab-worker-databus 0.20.19 → 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.
@@ -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;
@@ -1898,7 +1899,13 @@ var CrossTabDataBus = class {
1898
1899
  if (now - this.lastRecoveryAt >= this.recoveryCooldownMs) {
1899
1900
  this.lastRecoveryAt = now;
1900
1901
  const attempt = ++this.recoveryAttempt;
1901
- if (attempt > this.recoveryMaxAttempts) return;
1902
+ if (attempt > this.recoveryMaxAttempts) {
1903
+ if (!this.recoveryExhausted) {
1904
+ this.recoveryExhausted = true;
1905
+ this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: this.recoveryMaxAttempts, outcome: "exhausted" });
1906
+ }
1907
+ return;
1908
+ }
1902
1909
  this.trace.event({ type: "reliability", operation: "transport_recovery", attempt, outcome: "scheduled" });
1903
1910
  setTimeout(() => {
1904
1911
  if (this.stopping || !this.started || this.suspended) return;
@@ -2010,6 +2017,7 @@ var CrossTabDataBus = class {
2010
2017
  if (traceAttempt !== void 0) {
2011
2018
  this.trace.event({ type: "reliability", operation: "transport_recovery", attempt: traceAttempt, outcome: "succeeded" });
2012
2019
  this.recoveryAttempt = 0;
2020
+ this.recoveryExhausted = false;
2013
2021
  }
2014
2022
  if (this.startPromise === opening) this.startPromise = null;
2015
2023
  },