File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 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" : {
Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments