Browse Source

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

dev1
paweldomas 9 years ago
parent
commit
27a692e1b3
2 changed files with 13 additions and 1 deletions
  1. 12
    0
      JitsiConnectionErrors.js
  2. 1
    1
      modules/xmpp/xmpp.js

+ 12
- 0
JitsiConnectionErrors.js View File

2
  * The errors for the connection.
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
  * Indicates that a connection error occurred when trying to join a conference.
18
  * Indicates that a connection error occurred when trying to join a conference.
7
  */
19
  */

+ 1
- 1
modules/xmpp/xmpp.js View File

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

Loading…
Cancel
Save