vim-web 0.3.42-dev.2 → 0.3.42-dev.3

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/vim-web.js CHANGED
@@ -59913,19 +59913,22 @@ class SocketClient {
59913
59913
  * @param _event - The event object.
59914
59914
  */
59915
59915
  _onClose(_event) {
59916
+ this._logger.log("WebSocket closed.");
59916
59917
  clearTimeout(this._connectionTimeout);
59917
59918
  this._disconnect({ status: "error", error: "connection", serverUrl: this._connectingUrl });
59918
- this._logger.log("WebSocket closed.");
59919
- if (this._retries !== 0) {
59920
- this._logger.log("Attempting to reconnect in 5 seconds");
59921
- this._reconnectTimeout = setTimeout(() => {
59922
- this.updateState({ status: "connecting" });
59923
- this.connect({
59924
- url: this._connectingUrl,
59925
- retries: this._retries - 1
59926
- });
59927
- }, 5e3);
59919
+ if (this._retries === 0) {
59920
+ this._logger.log("No more retries left");
59921
+ this._connectPromise.resolve();
59922
+ return;
59928
59923
  }
59924
+ this._logger.log("Attempting to reconnect in 5 seconds");
59925
+ this._reconnectTimeout = setTimeout(() => {
59926
+ this.updateState({ status: "connecting" });
59927
+ this.connect({
59928
+ url: this._connectingUrl,
59929
+ retries: this._retries - 1
59930
+ });
59931
+ }, 5e3);
59929
59932
  }
59930
59933
  /**
59931
59934
  * Sends binary data over the WebSocket connection.