Kaynağa Gözat

feat(xmpp): emit connection error when we give up

Otherwise, if we never connected, we won't know.
dev1
Saúl Ibarra Corretgé 8 yıl önce
ebeveyn
işleme
5a58b51acf
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5
    0
      modules/xmpp/xmpp.js

+ 5
- 0
modules/xmpp/xmpp.js Dosyayı Görüntüle

@@ -177,6 +177,11 @@ export default class XMPP extends Listenable {
177 177
                 this.connectionFailed = true;
178 178
             }
179 179
             this.lastErrorMsg = msg;
180
+            if (msg === 'giving-up') {
181
+                this.eventEmitter.emit(
182
+                    JitsiConnectionEvents.CONNECTION_FAILED,
183
+                    JitsiConnectionErrors.OTHER_ERROR, msg);
184
+            }
180 185
         } else if (status === Strophe.Status.DISCONNECTED) {
181 186
             // Stop ping interval
182 187
             this.connection.ping.stopInterval();

Loading…
İptal
Kaydet