vim-web 0.3.42-dev.0 → 0.3.42-dev.2
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
|
@@ -59719,7 +59719,7 @@ class SocketClient {
|
|
|
59719
59719
|
__publicField(this, "_rpcCallId", 0);
|
|
59720
59720
|
__publicField(this, "_reconnectTimeout");
|
|
59721
59721
|
__publicField(this, "_connectionTimeout");
|
|
59722
|
-
__publicField(this, "
|
|
59722
|
+
__publicField(this, "_retries", -1);
|
|
59723
59723
|
__publicField(this, "_validateConnection");
|
|
59724
59724
|
/**
|
|
59725
59725
|
* Callback function to handle incoming video frames.
|
|
@@ -59773,7 +59773,7 @@ class SocketClient {
|
|
|
59773
59773
|
connect(settings2) {
|
|
59774
59774
|
settings2 = {
|
|
59775
59775
|
url: (settings2 == null ? void 0 : settings2.url) ?? DEFAULT_LOCAL_ULTRA_SERVER_URL,
|
|
59776
|
-
|
|
59776
|
+
retries: (settings2 == null ? void 0 : settings2.retries) ?? 0
|
|
59777
59777
|
};
|
|
59778
59778
|
const url = settings2.url;
|
|
59779
59779
|
if (!isWebSocketUrl(url)) {
|
|
@@ -59786,12 +59786,11 @@ class SocketClient {
|
|
|
59786
59786
|
} else {
|
|
59787
59787
|
this._clearSocket();
|
|
59788
59788
|
this._connectPromise.reject("Connection to a different server");
|
|
59789
|
-
this._connectPromise = new ControllablePromise();
|
|
59790
59789
|
}
|
|
59791
|
-
} else if (this._connectingUrl !== url) {
|
|
59792
|
-
this._connectPromise = new ControllablePromise();
|
|
59793
|
-
this._connectingUrl = url;
|
|
59794
59790
|
}
|
|
59791
|
+
this._connectPromise = new ControllablePromise();
|
|
59792
|
+
this._connectingUrl = settings2.url;
|
|
59793
|
+
this._retries = settings2.retries;
|
|
59795
59794
|
this.updateState({ status: "connecting" });
|
|
59796
59795
|
try {
|
|
59797
59796
|
this._socket = new WebSocket(url);
|
|
@@ -59917,13 +59916,13 @@ class SocketClient {
|
|
|
59917
59916
|
clearTimeout(this._connectionTimeout);
|
|
59918
59917
|
this._disconnect({ status: "error", error: "connection", serverUrl: this._connectingUrl });
|
|
59919
59918
|
this._logger.log("WebSocket closed.");
|
|
59920
|
-
if (this.
|
|
59919
|
+
if (this._retries !== 0) {
|
|
59921
59920
|
this._logger.log("Attempting to reconnect in 5 seconds");
|
|
59922
59921
|
this._reconnectTimeout = setTimeout(() => {
|
|
59923
59922
|
this.updateState({ status: "connecting" });
|
|
59924
59923
|
this.connect({
|
|
59925
59924
|
url: this._connectingUrl,
|
|
59926
|
-
|
|
59925
|
+
retries: this._retries - 1
|
|
59927
59926
|
});
|
|
59928
59927
|
}, 5e3);
|
|
59929
59928
|
}
|