Closed baczus closed 8 years ago
You want to send data when the system isn't connected ? Even if the modification are made to support that, the Stomp.js underlying system wont allow this operation.
From the official doc of Stomp.js :
When a client is disconnected, it can no longer send or receive messages
So, I think the problem is somewhere else. You have to choose a smaller timeOut or check the state of the connection. I could add a method on the service to say if the system is connected or not (which will rely on the state of the promise).
Good point. Right now it is imposibble to determine state of the connection. It would be great if you could add such a method.
I'll close this issue and open another to add this element :D
Hi, I noticed that library rejects promise when connection fails and creates new one after dealy (this.settings.timeOut). If I set 30 seconds to reconnect, during this time functions send and unsubscribe won't work properly, because they rely on promise, which is rejected.