diff --git a/lib/server.js b/lib/server.js index 5493a9ea..28779f68 100644 --- a/lib/server.js +++ b/lib/server.js @@ -72,6 +72,9 @@ Server.prototype.close = function() { const connection = this.clients[cid]; connection.close(); }); + + this.clients = {}; + this._cachedClientsArray = []; }; // Get all clients as an array of JSTP connection instances