Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

223
Visualizações
chat problem: socket-io goes offline when mobile is locked - how to see the newly received messages?

i am developing a social network with a chat messenger. it's a responsive web application. the messages are saved on mongo db, and then sent instantly through socket io. the problem is when computer is sleeping/mobile is locked, the socket io connection goes off. and when coming back from sleep/lock mode, the connection doesn't re-create. let's say a user got couple of messages when his phone was locked, and the webpage was open there waiting for him. even if i re-connect the socket when user starts interacting with webpage again, still the user will not see the instant messages he was getting, because the messages from mongo arrive only when entering the app for the first time.

the only solution i can think about is that when coming back from sleep, the web page should reset itself and loads again with all the data from mongo db.

do you have any better idea? is auto refreshing after detecting waking up from sleep mode, is even possible?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda