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