Bläddra i källkod

fix(JitsiConnectionErrors): split "dropped" from "other" error type

dev1
paweldomas 8 år sedan
förälder
incheckning
27a692e1b3
2 ändrade filer med 13 tillägg och 1 borttagningar
  1. 12
    0
      JitsiConnectionErrors.js
  2. 1
    1
      modules/xmpp/xmpp.js

+ 12
- 0
JitsiConnectionErrors.js Visa fil

@@ -2,6 +2,18 @@
2 2
  * The errors for the connection.
3 3
  */
4 4
 
5
+/**
6
+ * Indicates that the connection was dropped with an error which was most likely
7
+ * caused by some networking issues. The dropped term in this context means that
8
+ * the connection was closed unexpectedly (not on user's request).
9
+ *
10
+ * One example is 'item-not-found' error thrown by Prosody when the BOSH session
11
+ * times out after 60 seconds of inactivity. On the other hand 'item-not-found'
12
+ * could also happen when BOSH request is sent to the server with the session-id
13
+ * that is not know to the server. But this should not happen in lib-jitsi-meet
14
+ * case as long as the service is configured correctly (there is no bug).
15
+ */
16
+export const CONNECTION_DROPPED_ERROR = "connection.droppedError";
5 17
 /**
6 18
  * Indicates that a connection error occurred when trying to join a conference.
7 19
  */

+ 1
- 1
modules/xmpp/xmpp.js Visa fil

@@ -175,7 +175,7 @@ export default class XMPP {
175 175
                 } else {
176 176
                     this.eventEmitter.emit(
177 177
                         JitsiConnectionEvents.CONNECTION_FAILED,
178
-                        JitsiConnectionErrors.OTHER_ERROR,
178
+                        JitsiConnectionErrors.CONNECTION_DROPPED_ERROR,
179 179
                         errMsg ? errMsg : 'connection-dropped-error');
180 180
                 }
181 181
             } else {

Laddar…
Avbryt
Spara