signout/lock text

This commit is contained in:
Matias Alejo Garcia 2014-12-03 00:30:44 -03:00 committed by Gustavo Maximiliano Cortez
commit 74d6f76d8e
4 changed files with 16 additions and 13 deletions

View file

@ -355,17 +355,17 @@ Identity.prototype.remove = function(opts, cb) {
};
Identity.prototype._cleanUp = function() {
// NOP
_.each(this.wallets, function(w){
w.close();
});
};
/**
* @desc Closes the wallet and disconnects all services
*/
Identity.prototype.close = function() {
var self = this;
self.store({}, function(err) {
self.emitAndKeepAlive('closed');
});
this._cleanUp();
this.emitAndKeepAlive('closed');
};