Skip to content

Commit a6cd432

Browse files
committed
Test with timeout
1 parent 4083caa commit a6cd432

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
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.5",
3+
"version": "1.0.6",
44
"main": "dist/main.js",
55
"typings": "dist/index.d.ts",
66
"scripts": {

src/components/CommsManager.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ export default class CommsManager {
6363
);
6464
} else {
6565
console.log(`Connection with ${CommsManager.adress} interrupted`);
66-
delete CommsManager.instance;
67-
CommsManager.instance = new CommsManager();
66+
setTimeout(function() {
67+
delete CommsManager.instance;
68+
CommsManager.instance = new CommsManager();
69+
}, 1000);
6870
}
6971
};
7072
}

0 commit comments

Comments
 (0)