Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Reconnection seems to be not working #54

Closed
liluxdev opened this issue Feb 1, 2018 · 4 comments
Closed

Reconnection seems to be not working #54

liluxdev opened this issue Feb 1, 2018 · 4 comments

Comments

@liluxdev
Copy link

liluxdev commented Feb 1, 2018

If i restart my backend I get this output on the client:

Thu Feb 01 2018 15:02:59 GMT+0100 (CET) "Whoops! Lost connection to omissis/ws"
ng2-stompjs.es5.js:58 Thu Feb 01 2018 15:02:59 GMT+0100 (CET) "Error: Whoops! Lost connection to omissis/ws"
ng2-stompjs.es5.js:58 Thu Feb 01 2018 15:02:59 GMT+0100 (CET) "STOMP: scheduling reconnection in 5000ms"
ng2-stompjs.es5.js:58 Thu Feb 01 2018 15:03:04 GMT+0100 (CET) "STOMP: attempting to reconnect"
ng2-stompjs.es5.js:58 Thu Feb 01 2018 15:03:04 GMT+0100 (CET) "Opening Web Socket..."

But it stucks to this state: Opening Web Socket... no more info

@liluxdev
Copy link
Author

liluxdev commented Feb 1, 2018

I'm using SockJS

@kum-deepak
Copy link
Member

Please check the instructions for using with SockJS here: https://stomp-js.github.io/ng2-stompjs/additional-documentation/sock-js.html

Kindly report if it does not help.

@liluxdev
Copy link
Author

liluxdev commented Feb 1, 2018

Thanks, it helped!

You can close this issue, as as stated in your docs:
https://stomp-js.github.io/stomp-websocket/codo/extra/docs-src/sockjs.md.html

SockJS internally uses one of many possible means to communicate. In some of those, auto reconnect may occasionally fail.

But thanks to your docs I understood I wasn't I need of use SockJS, I swichted to pure websockets and I've no issues

@kum-deepak
Copy link
Member

Used this opportunity to update https://stomp-js.github.io/ng2-stompjs/additional-documentation/sock-js.html

Also added a note in Readme pointing to this documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants