diff --git a/lib/atmosphere.js b/lib/atmosphere.js index 82fcee9..89350e4 100644 --- a/lib/atmosphere.js +++ b/lib/atmosphere.js @@ -169,6 +169,13 @@ Atmosphere = { fn(Atmosphere._client = ddpclient); }); }, + + disconnect: function() { + if (Atmosphere._client) { + Atmosphere._client.close(); + delete Atmosphere._client; + } + }, login: function(fn) { Atmosphere.connect(function(ddpclient) {