Skip to content

Commit 132eb6c

Browse files
committed
Revert changes
1 parent b8095c1 commit 132eb6c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jderobot-commsmanager",
3-
"version": "1.0.20",
3+
"version": "1.0.24",
44
"main": "dist/main.js",
55
"typings": "dist/index.d.ts",
66
"scripts": {

src/components/CommsManager.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export default class CommsManager {
1313
private ws: WebSocket;
1414
private observers: { [id: string]: Function[] } = {};
1515
private pendingPromises: Map<string, PromiseHandlers> = new Map();
16-
private timeoutId?: number;
1716
private static state: string = "idle";
1817
private static adress: string = "ws://127.0.0.1:7163";
1918
private static universe?: string;
@@ -74,7 +73,7 @@ export default class CommsManager {
7473
console.log(`Connection with ${CommsManager.adress} interrupted`);
7574
}
7675

77-
this.timeoutId = window.setTimeout(function () {
76+
window.setTimeout(function () {
7877
delete CommsManager.instance;
7978
CommsManager.instance = new CommsManager();
8079
}, 1000);
@@ -92,9 +91,6 @@ export default class CommsManager {
9291

9392
public static deleteInstance() {
9493
if (CommsManager.instance) {
95-
if (CommsManager.instance.timeoutId) {
96-
window.clearTimeout(CommsManager.instance.timeoutId);
97-
}
9894
delete CommsManager.instance;
9995
CommsManager.instance = undefined;
10096
}

0 commit comments

Comments
 (0)