Closed michael-wirth closed 8 years ago
Because of the abstraction of stomp, I don't think checking the state of SockJs is à good idea... It could be better to reset the stompClient on disconnect() or at the beggining of connect().
What do you think of this solution ? II will try to do the modification this weekend, but if you want to do a PR, you're welcome
Fix in https://github.com/davinkevin/AngularStompDK/commit/f4b29473778055459ad715fcdf6c8351fc2d5b1c --> v0.3.1
Tell me if it's ok for you (if I forget something maybe...)
Thanks, the fix works fine!!
As an improvement: The subscribe() function should do an implicit connect() if the connection was closed or throw an error 'connection closed' to indicate the subscription failed.
Disconnect and Re-connect using SockJS doesn't work. It seems to re-open a SockJS connection it is required to create a new SockJS object. As this object is created once in the constructor it will fail.
If the SockJS object is already closed a new instance should be created.
Log: