Skip to content

Commit

Permalink
Atmosphere.disconnect() method was added - it synchronously closes ex…
Browse files Browse the repository at this point in the history
…isting DDP connection, if any
  • Loading branch information
yeputons committed Jan 12, 2014
1 parent e877f49 commit 6d89351
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6d89351

Please sign in to comment.