Skip to content

Commit 1a18f34

Browse files
committed
reran build and updated version
1 parent db93ec5 commit 1a18f34

File tree

5 files changed

+37
-37
lines changed

5 files changed

+37
-37
lines changed

out/client/socket.js

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

out/client/socket.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "websocketapi",
3-
"version": "1.1.16",
3+
"version": "1.1.17",
44
"description": "",
55
"main": "out/index.js",
66
"types": "out/index.d.ts",

static/bundle.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -659,29 +659,29 @@ function createNewConnection() {
659659
}
660660
}
661661
});
662-
exports.socket.addEventListener("error", (error) => {
663-
exports.ready = false;
664-
console.error(error);
665-
exports.stateChangeEvents.forEach(callback => callback("ERROR"));
666-
});
667-
exports.socket.addEventListener("close", () => {
668-
exports.ready = false;
669-
const timeout = typeof index_1.setOptions.reconnectTimeOut === "function" ? index_1.setOptions.reconnectTimeOut() : index_1.setOptions.reconnectTimeOut;
670-
// wait for a little before reconnecting
671-
if (index_1.setOptions.reconnect) {
672-
setTimeout(createNewConnection, timeout);
673-
}
674-
// if the previous state wasn't auth failed then send a closed message
675-
if ((0, index_1.getCurrentState)() !== "AUTHFAILED") {
676-
exports.stateChangeEvents.forEach(callback => callback("CLOSED"));
677-
}
678-
});
679662
exports.stateChangeEvents.forEach(callback => callback("OPEN"));
680663
}
681664
else {
682665
createNewConnection();
683666
}
684667
});
668+
exports.socket.addEventListener("error", (error) => {
669+
exports.ready = false;
670+
console.error(error);
671+
exports.stateChangeEvents.forEach(callback => callback("ERROR"));
672+
});
673+
exports.socket.addEventListener("close", () => {
674+
exports.ready = false;
675+
const timeout = typeof index_1.setOptions.reconnectTimeOut === "function" ? index_1.setOptions.reconnectTimeOut() : index_1.setOptions.reconnectTimeOut;
676+
// wait for a little before reconnecting
677+
if (index_1.setOptions.reconnect) {
678+
setTimeout(createNewConnection, timeout);
679+
}
680+
// if the previous state wasn't auth failed then send a closed message
681+
if ((0, index_1.getCurrentState)() !== "AUTHFAILED") {
682+
exports.stateChangeEvents.forEach(callback => callback("CLOSED"));
683+
}
684+
});
685685
}
686686
/**
687687
* Create a fetch request from the server

0 commit comments

Comments
 (0)