@agentvault/secure-channel 0.6.16 → 0.6.17

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.js CHANGED
@@ -45579,6 +45579,10 @@ var SecureChannel = class _SecureChannel extends EventEmitter {
45579
45579
  }
45580
45580
  _connect() {
45581
45581
  if (this._stopped) return;
45582
+ if (this._reconnectTimer) {
45583
+ clearTimeout(this._reconnectTimer);
45584
+ this._reconnectTimer = null;
45585
+ }
45582
45586
  if (this._ws) {
45583
45587
  this._ws.removeAllListeners();
45584
45588
  try {
@@ -46124,7 +46128,9 @@ ${messageText}`;
46124
46128
  RECONNECT_MAX_MS
46125
46129
  );
46126
46130
  this._reconnectAttempt++;
46131
+ console.log(`[SecureChannel] Scheduling reconnect in ${delay}ms (attempt ${this._reconnectAttempt})`);
46127
46132
  this._reconnectTimer = setTimeout(() => {
46133
+ this._reconnectTimer = null;
46128
46134
  if (!this._stopped) {
46129
46135
  this._connect();
46130
46136
  }