Not receiving messages after reconnecting on mobile, when device lost connection earlier

Discussão em 'Angular' iniciado por quma, Outubro 23, 2024.

  1. quma

    quma Guest

    I use stomClient and SockJS in this way:

    const socket = new SockJS(this.authService.getCompleteUrl() + 'chat');
    this.stompClient = Stomp.over(socket);
    this.stompClient.reconnect_delay = 4000;
    this.stompClient.connect({}, function(frame) {
    self.stompClient.subscribe('/topic/chat/'
    ...


    This code works fine in Simulator, but an a real mobile device, if I disable internet connection and reconnect and afterwards will send a message, is does not work. If I reinitialize stompClient than it works like it should. Does anyone have any hint how so solve this?

    Continue reading...

Compartilhe esta Página