Fixed logout error handling

This commit is contained in:
Giulio Cesare Solaroli 2015-12-03 16:51:56 +01:00
parent ae973776ee
commit a67d190927

View File

@ -431,10 +431,15 @@ Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.
//========================================================================= //=========================================================================
'logout': function() { 'logout': function() {
return Clipperz.Async.callbacks("Connection.logout", [ var deferredResult;
MochiKit.Base.method(this, 'setSharedSecret'),
MochiKit.Base.method(this.proxy(), 'logout', {}) deferredResult = new Clipperz.Async.Deferred("Connection.login", {trace:false});
], {trace:false}); deferredResult.addMethod(this, 'setSharedSecret');
deferredResult.addMethod(this.proxy(), 'logout', {});
deferredResult.addErrback(function (aResult) { Clipperz.log("Ignored error while logging out"); return {}; });
deferredResult.callback();
return deferredResult;
}, },
//========================================================================= //=========================================================================