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

295
Views
why i get an error on slow connections in Socket io v4

when i use socke.io at normal internet speed it works fine.But when I simulate a slow 3G in the chrome developer console.

This error is displayed:

failed: WebSocket is closed before the connection is established.

How do I configure socket.io for slow internet connection?

This is my configuration:

   io("ws:xxxxx.xxxx", {
        transports: ["websocket"],
        upgrade: true,
        path: "messenger",
        query: {
          token: "xxxxxxxxxx",
        },
        timeout: 1000,
    });

note: this configuration works on a fast connection.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You're closing the socket before socketio has a chance to connect. Increase the timeout value to around 10000 (10 seconds), and that should solve your issue.

about 4 years ago · Juan Pablo Isaza Report
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!