mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Merge pull request #708 from rase-/fix/reconnect_failed-double-fire
Fix duplicate `reconnect_failed` event
This commit is contained in:
@@ -151,7 +151,8 @@ Manager.prototype.timeout = function(v){
|
||||
*/
|
||||
|
||||
Manager.prototype.maybeReconnectOnOpen = function() {
|
||||
if (!this.openReconnect && !this.reconnecting && this._reconnection) {
|
||||
// Only try to reconnect if it's the first time we're connecting
|
||||
if (!this.openReconnect && !this.reconnecting && this._reconnection && this.attempts === 0) {
|
||||
// keeps reconnection from firing twice for the same reconnection loop
|
||||
this.openReconnect = true;
|
||||
this.reconnect();
|
||||
|
||||
Reference in New Issue
Block a user