Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!