diff options
author | Robert Zorko <robertz@gurucue.com> | 2015-12-16 14:21:33 +0100 |
---|---|---|
committer | Robert Zorko <robertz@gurucue.com> | 2015-12-16 14:21:33 +0100 |
commit | a7fa6cfffebe3026198ad8beb0e06543d3503bb6 (patch) | |
tree | f8d322a40900c778b1178807492ecbe0e6c58d66 /js/codeq/comms.js | |
parent | ca3aa94da7798bba4fed6ae467d8fa94324a832e (diff) | |
parent | e906718cefc3f5fc7a279c7cae3a76fbdc184961 (diff) |
merge with Ales fixes
Diffstat (limited to 'js/codeq/comms.js')
-rw-r--r-- | js/codeq/comms.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/codeq/comms.js b/js/codeq/comms.js index e964f20..5e046b7 100644 --- a/js/codeq/comms.js +++ b/js/codeq/comms.js @@ -557,6 +557,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ 'samlLogout': function(){ return this.send({'action':'saml_logout'}); + }, + + 'forceReset': function () { + var p; + if (sid !== null) { + p = Q.Promise(function (resolve, reject, notify) { + var t = setTimeout(function () { + t = null; + resolve(); + }, 3000); // 3 seconds + codeq.comms.logout().then(function () { + if (t !== null) { + clearTimeout(t); + t = null; + resolve(); + } + }); + }); + } + else p = Q(); + return p.fin(codeq.comms.disconnect); } }; })(); |