@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.
@@ -20169,13 +20169,14 @@ var WebSocketController = class WebSocketController extends Destroyable {
20169
20169
  }
20170
20170
  scheduleReconnection() {
20171
20171
  this.clearReconnectTimer();
20172
+ const jitteredDelay = this.currentReconnectDelay * (.5 + Math.random() * .5);
20172
20173
  this.reconnectTimer = setTimeout(() => {
20173
20174
  if (this.shouldReconnect) {
20174
20175
  this._status$.next("connecting");
20175
20176
  this.createWebSocket();
20176
20177
  this.increaseReconnectDelay();
20177
20178
  }
20178
- }, this.currentReconnectDelay);
20179
+ }, jitteredDelay);
20179
20180
  }
20180
20181
  increaseReconnectDelay() {
20181
20182
  this.currentReconnectDelay = Math.min(this.currentReconnectDelay * 2, this.reconnectDelayMax);