Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8165919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:41:13+00:00 2026-06-06T19:41:13+00:00

Simple scenario: Client connects to server with socket.io ( socket = io.connect(…) ) Server

  • 0

Simple scenario:

  1. Client connects to server with socket.io (socket = io.connect(...))
  2. Server crashes
  3. Client tries to reconnect
  4. User tells client to disconnect (socket.disconnect())
  5. Server starts
  6. Client reconnects

It seems that once socket.io starts attempting to reconnect, it cannot be stopped anymore. I want step 4 to prevent step 6 from happening, but it doesn’t. What do I have to call instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:41:15+00:00Added an answer on June 6, 2026 at 7:41 pm

    You might want to handle the reconnection yourself.

    // Disables the automatic reconnection
    var socket = io.connect('http://server.com', {
        reconnection: false
    });
    
    // Reconnects on disconnection
    socket.on('disconnect', function(){
        socket.connect(callback);
    });
    

    Note: old versions used reconnect instead of reconnection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a simple client/server scenario with one method: // client code $client
hey guys, here's a simple scenario NServiceBus Client/Server setup. The Message is a custom
Good morning. Take this simple scenario: I've got a NetClient that connects itself to
Scenario. I have a client with two network connections to a server. One connection
I have created a simple chat server that is driven by client polling. Clients
Suppose this simple scenario: My client has an already working .net application and he/she
A simple scenario. User logs in through the form baked by some high level
Here is my scenario: A is a provisioning server and B is an client.
I'm planning to use Netty to design a TCP Server. When the client connects,
Simple scenario: 1. My client wants to login to my website. he goes to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.