@polyguard/sdk 1.1.1 → 1.1.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/sdk.js
CHANGED
|
@@ -11086,7 +11086,7 @@
|
|
|
11086
11086
|
reconnectionDelay: 1e3,
|
|
11087
11087
|
reconnectionDelayGrowFactor: 1.5
|
|
11088
11088
|
};
|
|
11089
|
-
ws = new reconnecting_websocket_mjs_default(wsUrl, options);
|
|
11089
|
+
ws = new reconnecting_websocket_mjs_default(wsUrl, [], options);
|
|
11090
11090
|
ws.addEventListener("message", (event) => {
|
|
11091
11091
|
try {
|
|
11092
11092
|
const data = JSON.parse(event.data);
|
|
@@ -11144,6 +11144,8 @@
|
|
|
11144
11144
|
} else {
|
|
11145
11145
|
console.error("Unknown message type from server", data);
|
|
11146
11146
|
returnError(`Unknown message type from server`);
|
|
11147
|
+
ws.close();
|
|
11148
|
+
return;
|
|
11147
11149
|
}
|
|
11148
11150
|
} catch (e) {
|
|
11149
11151
|
console.error("Invalid message format from server", e);
|
package/package.json
CHANGED
|
@@ -160,7 +160,7 @@ export class PolyguardWebsocketClientImpl {
|
|
|
160
160
|
reconnectionDelay: 1000,
|
|
161
161
|
reconnectionDelayGrowFactor: 1.5,
|
|
162
162
|
};
|
|
163
|
-
ws = new ReconnectingWebSocket(wsUrl, options);
|
|
163
|
+
ws = new ReconnectingWebSocket(wsUrl, [], options);
|
|
164
164
|
ws.addEventListener('message', (event) => {
|
|
165
165
|
try {
|
|
166
166
|
const data = JSON.parse(event.data);
|
|
@@ -232,6 +232,8 @@ export class PolyguardWebsocketClientImpl {
|
|
|
232
232
|
} else {
|
|
233
233
|
console.error('Unknown message type from server', data);
|
|
234
234
|
returnError(`Unknown message type from server`);
|
|
235
|
+
ws.close();
|
|
236
|
+
return;
|
|
235
237
|
}
|
|
236
238
|
} catch (e) {
|
|
237
239
|
console.error('Invalid message format from server', e);
|