Improve handling of attempting to quit another client's session

This commit is contained in:
Cameron Gutman 2016-09-24 21:36:38 -07:00
parent 798ba56a15
commit bd881aaee4

View File

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