Skip to content

Commit d000e5c

Browse files
committed
More debug
1 parent 3da1944 commit d000e5c

File tree

2 files changed

+3
-12
lines changed

2 files changed

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

src/components/CommsManager.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,7 @@ export default class CommsManager {
2424

2525
// Private constructor to only allow single instatiation
2626
private constructor() {
27-
try {
28-
console.warn("Trying to connect to RAM")
29-
this.ws = new WebSocket(CommsManager.adress);
30-
} catch (error) {
31-
setTimeout(function () {
32-
delete CommsManager.instance;
33-
CommsManager.instance = new CommsManager();
34-
}, 1000);
35-
return;
36-
}
37-
console.warn("Connected to RAM")
27+
this.ws = new WebSocket(CommsManager.adress);
3828

3929
this.setManagerState({
4030
id: "",
@@ -141,6 +131,7 @@ export default class CommsManager {
141131
// Send messages and manage promises
142132
public async send(message: string, data?: Object): Promise<any> {
143133
const id = uuidv4();
134+
console.warn("Sending message", this.ws)
144135

145136
// Reject with an Error directly if unable to connect
146137
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {

0 commit comments

Comments
 (0)