Closed cmadsen closed 9 years ago
How do I detect a lost connection and reconnect using a WebSocketStompClient?
WebSocketStompClient
Using SockJS I would do something like this:
var reconnect = function() { setTimeout(initSockets, 10000); }; var initSockets = function() { var socket = {}; socket.client = new SockJS('http://....'); ... socket.client.onclose = reconnect; }
Also, is it possible to get notified every time the WebSocketStompClient receives a heartbeat somehow?
This was caused by using tomcat-websocket 8.0.0-RC5 switching to 8.0.27 fixed it.
How do I detect a lost connection and reconnect using a
WebSocketStompClient
?Using SockJS I would do something like this:
Also, is it possible to get notified every time the WebSocketStompClient receives a heartbeat somehow?