vim-web 0.3.42-dev.1 → 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.iife.js +16 -14
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +16 -14
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
package/dist/vim-web.iife.js
CHANGED
|
@@ -59802,12 +59802,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
59802
59802
|
} else {
|
|
59803
59803
|
this._clearSocket();
|
|
59804
59804
|
this._connectPromise.reject("Connection to a different server");
|
|
59805
|
-
this._connectPromise = new ControllablePromise();
|
|
59806
59805
|
}
|
|
59807
|
-
} else if (this._connectingUrl !== url) {
|
|
59808
|
-
this._connectPromise = new ControllablePromise();
|
|
59809
|
-
this._connectingUrl = url;
|
|
59810
59806
|
}
|
|
59807
|
+
this._connectPromise = new ControllablePromise();
|
|
59808
|
+
this._connectingUrl = settings2.url;
|
|
59809
|
+
this._retries = settings2.retries;
|
|
59811
59810
|
this.updateState({ status: "connecting" });
|
|
59812
59811
|
try {
|
|
59813
59812
|
this._socket = new WebSocket(url);
|
|
@@ -59930,19 +59929,22 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
59930
59929
|
* @param _event - The event object.
|
|
59931
59930
|
*/
|
|
59932
59931
|
_onClose(_event) {
|
|
59932
|
+
this._logger.log("WebSocket closed.");
|
|
59933
59933
|
clearTimeout(this._connectionTimeout);
|
|
59934
59934
|
this._disconnect({ status: "error", error: "connection", serverUrl: this._connectingUrl });
|
|
59935
|
-
this.
|
|
59936
|
-
|
|
59937
|
-
this.
|
|
59938
|
-
|
|
59939
|
-
this.updateState({ status: "connecting" });
|
|
59940
|
-
this.connect({
|
|
59941
|
-
url: this._connectingUrl,
|
|
59942
|
-
retries: this._retries - 1
|
|
59943
|
-
});
|
|
59944
|
-
}, 5e3);
|
|
59935
|
+
if (this._retries === 0) {
|
|
59936
|
+
this._logger.log("No more retries left");
|
|
59937
|
+
this._connectPromise.resolve();
|
|
59938
|
+
return;
|
|
59945
59939
|
}
|
|
59940
|
+
this._logger.log("Attempting to reconnect in 5 seconds");
|
|
59941
|
+
this._reconnectTimeout = setTimeout(() => {
|
|
59942
|
+
this.updateState({ status: "connecting" });
|
|
59943
|
+
this.connect({
|
|
59944
|
+
url: this._connectingUrl,
|
|
59945
|
+
retries: this._retries - 1
|
|
59946
|
+
});
|
|
59947
|
+
}, 5e3);
|
|
59946
59948
|
}
|
|
59947
59949
|
/**
|
|
59948
59950
|
* Sends binary data over the WebSocket connection.
|