From 4849929f83f3716bc8c4b129aa11d52cebc5c97d Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 17 Sep 2013 11:19:37 -0700 Subject: [PATCH] Add disconnect on logout --- clientapp/router.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clientapp/router.js b/clientapp/router.js index 6e271f3..0d0a630 100644 --- a/clientapp/router.js +++ b/clientapp/router.js @@ -1,4 +1,4 @@ -/*global app, me*/ +/*global app, me, client*/ "use strict"; var Backbone = require('backbone'); @@ -41,6 +41,9 @@ module.exports = Backbone.Router.extend({ } }, logout: function () { + if (client.sessionStarted) { + client.disconnect(); + } localStorage.clear(); window.location = '/login'; }