summaryrefslogtreecommitdiff
path: root/js/codeq/comms.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/codeq/comms.js')
-rw-r--r--js/codeq/comms.js21
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);
}
};
})();