From 7cd3701f26b8a7a86e88a28da0bb104d731b622d Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 11 Mar 2020 18:00:46 +0100 Subject: [PATCH] Debug reconnect issues --- www/common/common-ui-elements.js | 3 ++- www/common/outer/async-store.js | 6 ++++++ www/common/sframe-app-framework.js | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 3bddcc41b..c684ac32c 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -4221,7 +4221,7 @@ define([ }; UIElements.onServerError = function (common, err, toolbar, cb) { - if (["EDELETED", "EEXPIRED", "ERESTRICTED"].indexOf(err.type) === -1) { return; } + //if (["EDELETED", "EEXPIRED", "ERESTRICTED"].indexOf(err.type) === -1) { return; } var priv = common.getMetadataMgr().getPrivateData(); var msg = err.type; if (err.type === 'EEXPIRED') { @@ -4243,6 +4243,7 @@ define([ } var sframeChan = common.getSframeChannel(); sframeChan.event('EV_SHARE_OPEN', {hidden: true}); + err.loaded = true; // XXX DEBUG UI.errorLoadingScreen(msg, Boolean(err.loaded), Boolean(err.loaded)); (cb || function () {})(); }; diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index a9846067c..497babd22 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -1523,10 +1523,14 @@ define([ channel.bcast("PAD_LEAVE", m); }, onError: function (err) { + console.error(err); // XXX DEBUG + channel.bcast("PAD_ERROR", err); Store.leavePad(null, data, function () {}); }, onChannelError: function (err) { + console.warn(err); // XXX DEBUG + channel.bcast("PAD_ERROR", err); Store.leavePad(null, data, function () {}); }, @@ -2097,6 +2101,8 @@ define([ var driveEventClients = []; var dropChannel = Store.dropChannel = function (chanId) { + console.error('Drop channel', chanId); // XXX DEBUG + try { store.messenger.leavePad(chanId); } catch (e) { console.error(e); } diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index a72d69f1a..f4567ee70 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -413,6 +413,8 @@ define([ }; var onError = function (err) { + console.error(err); // XXX DEBUG + common.onServerError(err, null, function () { if (err.type === 'ERESTRICTED') { stateChange(STATE.ERROR, err.type);