|
|
@@ -387,7 +387,8 @@ class ConferenceConnector {
|
|
387
|
387
|
// the app. Both the errors above are unrecoverable from the library
|
|
388
|
388
|
// perspective.
|
|
389
|
389
|
room.leave().then(() => connection.disconnect());
|
|
390
|
|
- APP.UI.showPageReloadOverlay(err);
|
|
|
390
|
+ APP.UI.showPageReloadOverlay(
|
|
|
391
|
+ false /* not a network type of failure */, err);
|
|
391
|
392
|
break;
|
|
392
|
393
|
|
|
393
|
394
|
case ConferenceErrors.CONFERENCE_MAX_USERS:
|
|
|
@@ -545,20 +546,34 @@ export default {
|
|
545
|
546
|
*/
|
|
546
|
547
|
_bindConnectionFailedHandler (connection) {
|
|
547
|
548
|
const handler = function (error, errMsg) {
|
|
548
|
|
- if (ConnectionErrors.OTHER_ERROR === error) {
|
|
549
|
|
- // - item-not-found
|
|
550
|
|
- // - connection dropped(closed by Strophe unexpectedly
|
|
551
|
|
- // possible due too many transport errors)
|
|
552
|
|
- logger.error("XMPP connection error: " + errMsg);
|
|
553
|
|
- APP.UI.showPageReloadOverlay(
|
|
554
|
|
- "xmpp-conn-dropped:" + errMsg);
|
|
555
|
|
- connection.removeEventListener(
|
|
556
|
|
- ConnectionEvents.CONNECTION_FAILED, handler);
|
|
557
|
|
- // FIXME it feels like the conference should be stopped
|
|
558
|
|
- // by lib-jitsi-meet
|
|
559
|
|
- if (room)
|
|
560
|
|
- room.leave();
|
|
|
549
|
+ /* eslint-disable no-case-declarations */
|
|
|
550
|
+ switch (error) {
|
|
|
551
|
+ case ConnectionErrors.CONNECTION_DROPPED_ERROR:
|
|
|
552
|
+ case ConnectionErrors.OTHER_ERROR:
|
|
|
553
|
+ case ConnectionErrors.SERVER_ERROR:
|
|
|
554
|
+
|
|
|
555
|
+ logger.error("XMPP connection error: " + errMsg);
|
|
|
556
|
+
|
|
|
557
|
+ // From all of the cases above only CONNECTION_DROPPED_ERROR
|
|
|
558
|
+ // is considered a network type of failure
|
|
|
559
|
+ const isNetworkFailure
|
|
|
560
|
+ = error === ConnectionErrors.CONNECTION_DROPPED_ERROR;
|
|
|
561
|
+
|
|
|
562
|
+ APP.UI.showPageReloadOverlay(
|
|
|
563
|
+ isNetworkFailure,
|
|
|
564
|
+ "xmpp-conn-dropped:" + errMsg);
|
|
|
565
|
+
|
|
|
566
|
+ connection.removeEventListener(
|
|
|
567
|
+ ConnectionEvents.CONNECTION_FAILED, handler);
|
|
|
568
|
+
|
|
|
569
|
+ // FIXME it feels like the conference should be stopped
|
|
|
570
|
+ // by lib-jitsi-meet
|
|
|
571
|
+ if (room)
|
|
|
572
|
+ room.leave();
|
|
|
573
|
+
|
|
|
574
|
+ break;
|
|
561
|
575
|
}
|
|
|
576
|
+ /* eslint-enable no-case-declarations */
|
|
562
|
577
|
};
|
|
563
|
578
|
connection.addEventListener(
|
|
564
|
579
|
ConnectionEvents.CONNECTION_FAILED, handler);
|