diff --git a/lib/manager.js b/lib/manager.js index 7a8defc2b..f2ab2a22a 100644 --- a/lib/manager.js +++ b/lib/manager.js @@ -386,6 +386,7 @@ Manager.prototype.cleanup = function(){ Manager.prototype.close = Manager.prototype.disconnect = function(){ this.skipReconnect = true; + this.readyState = 'closed'; this.engine && this.engine.close(); }; diff --git a/package.json b/package.json index b767985ab..4da2b22ac 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "dependencies": { "debug": "0.7.4", - "engine.io-client": "1.4.0", + "engine.io-client": "Automattic/engine.io-client#6d908e", "component-bind": "1.0.0", "component-emitter": "1.1.2", "object-component": "0.0.3", diff --git a/test/connection.js b/test/connection.js index ed5d645d9..faa179cb2 100644 --- a/test/connection.js +++ b/test/connection.js @@ -206,7 +206,7 @@ describe('connection', function() { setTimeout(function() { manager.engine.close(); - }, 500); + }, 1000); }); it('should try to reconnect twice and fail when requested two attempts with immediate timeout and reconnect enabled', function(done) {