Closed ajayshah1992 closed 2 years ago
SockJS is known to cause issues during automated reconnects. Please see https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/using-stomp-with-sockjs.html
Switch to directly using Websockets and see if that resolves the issue.
When I disconnect wifi and after few mins reconnect it by that time WS stops receiving message but still It is able to send msgs to other clients WS.
this.config = {
console prints when wifi is not off
internet State>>>> {hasInternetAccess: true, hasNetworkConnection: true} STOMP broker false client is active false called before connect Stomp connection status CLOSED Thu May 20 2021 17:48:16 GMT+0545 (Nepal Time) "Not connected, queueing" Thu May 20 2021 17:48:16 GMT+0545 (Nepal Time) "Opening Web Socket..." Thu May 20 2021 17:48:16 GMT+0545 (Nepal Time) "Web Socket Opened..." Thu May 20 2021 17:48:16 GMT+0545 (Nepal Time) ">>> CONNECT
Thu May 20 2021 17:48:16 GMT+0545 (Nepal Time) ">>> SEND destination:/topic/588aff69f866f2577f5262e2/global priority:low custom:userLiveNotice content-length:86
Stomp connection status TRYING
Console after wifi on and off
internet State>>>> {hasInternetAccess: false, hasNetworkConnection: false} STOMP broker true client is active true some api failing after disconnection GET https://dev-api.sparkworksoftware.com/api/chats/sync/u net::ERR_INTERNET_DISCONNECTED after wifi is turned ON internet State>>>> {hasInternetAccess: true, hasNetworkConnection: true} STOMP broker true client is active true
So there is no attempt to reconnect.