Skip to content

Callback after reconnectionAttempts reached? #3976

Answered by darrachequesne
jhogg11 asked this question in Q&A
Discussion options

You must be logged in to vote

Which version of socket.io-client are you using?

Starting with v3, the socket instance no longer emits events related to reconnection attempts, you must use:

socket.io.on("reconnect_attempt", function() {
    console.log("reconnecting")
});

socket.io.on('reconnect_failed', function() {
    console.log("reconnect failed");
});

Does that explain your issue?

Reference:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jhogg11
Comment options

Answer selected by jhogg11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants