Browse Source

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

Otherwise, if we never connected, we won't know.
dev1
Saúl Ibarra Corretgé 7 years ago
parent
commit
5a58b51acf
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      modules/xmpp/xmpp.js

+ 5
- 0
modules/xmpp/xmpp.js View File

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

Loading…
Cancel
Save