Coxer
Coxer

Reputation: 1704

socket.io event on reconnect timeout

I am using socket.io to do websocket communication within my application. After the connection is lost, it tries to reconnect 6 times, then it reaches a timeout. Is there any event, emitted when it is no longer trying to reconnect?

Upvotes: 0

Views: 945

Answers (2)

Coxer
Coxer

Reputation: 1704

Well I found that this is a known issue.

Reference: https://github.com/LearnBoost/socket.io/issues/652

Sad ... :(

Upvotes: 1

az7ar
az7ar

Reputation: 5237

From the source code it seems the event is "reconnect_failed"

if (this.attempts > this._reconnectionAttempts) {
this.emit('reconnect_failed');
this.reconnecting = false;
} 

Upvotes: 0

Related Questions