diff --git a/static/js/utils.js b/static/js/utils.js index 2025a4a..08a88de 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -438,9 +438,11 @@ NvHTTP.prototype = { }, quitApp: function () { - return sendMessage('openUrl', [this._baseUrlHttps + '/cancel?' + this._buildUidStr(), false]).then(function () { - this.currentGame = 0; - }.bind(this)); + return sendMessage('openUrl', [this._baseUrlHttps + '/cancel?' + this._buildUidStr(), false]) + // Refresh server info after quitting because it may silently fail if the + // session belongs to a different client. + // TODO: We should probably bubble this up to our caller. + .then(refreshServerInfo().bind(this)); }, pair: function(randomNumber) {