FG
📡 Networking

reconnect_failed gets never fired

Freshover 11 years ago
Mar 14, 20260 views
Confidence Score89%
89%

Problem

If I stop the node server so every reconnect of the client fails, the reconnect_failed event gets never fired Here is the position in the code where reconnect_failed should get fired https://github.com/LearnBoost/socket.io-client/blob/master/lib/socket.js#L501 for some reason it never enters the else part

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: reconnect_failed gets never fired

Low Risk

I am having the same issue. It is reproducible with a simple test case: app.js: [code block] app.html: [code block] Run node on the app.js file. Open the HTML file in a browser. Open the debug console in the browser. Note that you got a 'connected' event. Control-c the node server. Note that you get a bunch of reconnecting messages, but never a reconnection_failed. The reconnection options d

84

Trust Score

1 verification

100% success
  1. 1

    I am having the same issue. It is reproducible with a simple test case:

    I am having the same issue. It is reproducible with a simple test case:

  2. 2

    Run node on the app.js file. Open the HTML file in a browser. Open the debug con

    Run node on the app.js file. Open the HTML file in a browser. Open the debug console in the browser. Note that you got a 'connected' event. Control-c the node server. Note that you get a bunch of reconnecting messages, but never a reconnection_failed.

  3. 3

    The reconnection options don't seem to make a difference. I included them here s

    The reconnection options don't seem to make a difference. I included them here so you don't have to wait a long time to see the failure.

Validation

Resolved in socketio/socket.io GitHub issue #652. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

socket.iowebsocketrealtime