Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

226
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda