@signalwire/js 4.0.0-dev-20260413184400 → 4.0.0-dev-20260413184938

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/dist/index.cjs CHANGED
@@ -9683,13 +9683,14 @@ var WebSocketController = class WebSocketController extends Destroyable {
9683
9683
  }
9684
9684
  scheduleReconnection() {
9685
9685
  this.clearReconnectTimer();
9686
+ const jitteredDelay = this.currentReconnectDelay * (.5 + Math.random() * .5);
9686
9687
  this.reconnectTimer = setTimeout(() => {
9687
9688
  if (this.shouldReconnect) {
9688
9689
  this._status$.next("connecting");
9689
9690
  this.createWebSocket();
9690
9691
  this.increaseReconnectDelay();
9691
9692
  }
9692
- }, this.currentReconnectDelay);
9693
+ }, jitteredDelay);
9693
9694
  }
9694
9695
  increaseReconnectDelay() {
9695
9696
  this.currentReconnectDelay = Math.min(this.currentReconnectDelay * 2, this.reconnectDelayMax);