We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91c19f6 commit d0b7693Copy full SHA for d0b7693
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "jderobot-commsmanager",
3
- "version": "1.0.12",
+ "version": "1.0.13",
4
"main": "dist/main.js",
5
"typings": "dist/index.d.ts",
6
"scripts": {
src/components/CommsManager.ts
@@ -24,7 +24,15 @@ export default class CommsManager {
24
25
// Private constructor to only allow single instatiation
26
private constructor() {
27
- this.ws = new WebSocket(CommsManager.adress);
+ try {
28
+ this.ws = new WebSocket(CommsManager.adress);
29
+ } catch (error) {
30
+ setTimeout(function () {
31
+ delete CommsManager.instance;
32
+ CommsManager.instance = new CommsManager();
33
+ }, 1000);
34
+ return;
35
+ }
36
this.setManagerState({
37
id: "",
38
command: "",
0 commit comments