Debug reconnect issues

pull/1/head
yflory 5 years ago
parent a0ab44c82d
commit 7cd3701f26

@ -4221,7 +4221,7 @@ define([
}; };
UIElements.onServerError = function (common, err, toolbar, cb) { 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 priv = common.getMetadataMgr().getPrivateData();
var msg = err.type; var msg = err.type;
if (err.type === 'EEXPIRED') { if (err.type === 'EEXPIRED') {
@ -4243,6 +4243,7 @@ define([
} }
var sframeChan = common.getSframeChannel(); var sframeChan = common.getSframeChannel();
sframeChan.event('EV_SHARE_OPEN', {hidden: true}); sframeChan.event('EV_SHARE_OPEN', {hidden: true});
err.loaded = true; // XXX DEBUG
UI.errorLoadingScreen(msg, Boolean(err.loaded), Boolean(err.loaded)); UI.errorLoadingScreen(msg, Boolean(err.loaded), Boolean(err.loaded));
(cb || function () {})(); (cb || function () {})();
}; };

@ -1523,10 +1523,14 @@ define([
channel.bcast("PAD_LEAVE", m); channel.bcast("PAD_LEAVE", m);
}, },
onError: function (err) { onError: function (err) {
console.error(err); // XXX DEBUG
channel.bcast("PAD_ERROR", err); channel.bcast("PAD_ERROR", err);
Store.leavePad(null, data, function () {}); Store.leavePad(null, data, function () {});
}, },
onChannelError: function (err) { onChannelError: function (err) {
console.warn(err); // XXX DEBUG
channel.bcast("PAD_ERROR", err); channel.bcast("PAD_ERROR", err);
Store.leavePad(null, data, function () {}); Store.leavePad(null, data, function () {});
}, },
@ -2097,6 +2101,8 @@ define([
var driveEventClients = []; var driveEventClients = [];
var dropChannel = Store.dropChannel = function (chanId) { var dropChannel = Store.dropChannel = function (chanId) {
console.error('Drop channel', chanId); // XXX DEBUG
try { try {
store.messenger.leavePad(chanId); store.messenger.leavePad(chanId);
} catch (e) { console.error(e); } } catch (e) { console.error(e); }

@ -413,6 +413,8 @@ define([
}; };
var onError = function (err) { var onError = function (err) {
console.error(err); // XXX DEBUG
common.onServerError(err, null, function () { common.onServerError(err, null, function () {
if (err.type === 'ERESTRICTED') { if (err.type === 'ERESTRICTED') {
stateChange(STATE.ERROR, err.type); stateChange(STATE.ERROR, err.type);

Loading…
Cancel
Save