diff --git a/plugins/c9.fs/fs.cache.xml.js b/plugins/c9.fs/fs.cache.xml.js index 32cf2ca1..bc68d3ef 100644 --- a/plugins/c9.fs/fs.cache.xml.js +++ b/plugins/c9.fs/fs.cache.xml.js @@ -707,7 +707,7 @@ define(function(require, exports, module) { status: "pending", className: "projectRoot", isEditable: false, - map: {} + map: Object.create(null) }; var root = {}; root.map = Object.create(null); diff --git a/plugins/c9.vfs.client/vfs_client.js b/plugins/c9.vfs.client/vfs_client.js index da0b3c38..0fd09d42 100644 --- a/plugins/c9.vfs.client/vfs_client.js +++ b/plugins/c9.vfs.client/vfs_client.js @@ -209,6 +209,7 @@ define(function(require, exports, module) { } function reconnect(callback) { + if (!connection) return; connection.socket.setSocket(null); vfsEndpoint.get(protocolVersion, function(err, urls) { @@ -336,6 +337,11 @@ define(function(require, exports, module) { plugin.on("unload", function(){ loaded = false; + if (consumer) + consumer.disconnect(); + if (connection) + connection.disconnect(); + id = null; buffer = []; region = null; @@ -346,6 +352,7 @@ define(function(require, exports, module) { serviceUrl = null; eioOptions = null; consumer = null; + connection = null; vfs = null; showErrorTimer = null; showErrorTimerMessage = null; diff --git a/plugins/c9.vfs.standalone/www/test.html b/plugins/c9.vfs.standalone/www/test.html index cfc89979..b4c1320e 100644 --- a/plugins/c9.vfs.standalone/www/test.html +++ b/plugins/c9.vfs.standalone/www/test.html @@ -271,6 +271,7 @@ return cb(); setTimeout.paused = true; window.app.services.vfs.connection.disconnect(); + window.app.services["vfs.endpoint"].clearCache(); setTimeout.force(function() { setTimeout.paused = false; setTimeout.clear();