Browse Source

fix(JitsiConference) squelch bogus p2p session end error

After the refactor in
5a4232f908
the succesful terminating reason is expressed by the 'success' value in the
`reason`parameter, rather than having it undefined.

Ref: https://github.com/jitsi/lib-jitsi-meet/issues/1793#issuecomment-989913626
dev1
Saúl Ibarra Corretgé 3 years ago
parent
commit
be45cb6523
1 changed files with 4 additions and 5 deletions
  1. 4
    5
      JitsiConference.js

+ 4
- 5
JitsiConference.js View File

3593
             // crash the responder would stay in P2P mode until ICE fails which
3593
             // crash the responder would stay in P2P mode until ICE fails which
3594
             // could take up to 20 seconds.
3594
             // could take up to 20 seconds.
3595
             //
3595
             //
3596
-            // NOTE lack of 'reason' is considered as graceful session terminate
3596
+            // NOTE: whilst this is an error callback,  'success' as a reason is
3597
+            // considered as graceful session terminate
3597
             // where both initiator and responder terminate their sessions
3598
             // where both initiator and responder terminate their sessions
3598
             // simultaneously.
3599
             // simultaneously.
3599
-            if (reason) {
3600
-                logger.error(
3601
-                    'An error occurred while trying to terminate'
3602
-                        + ' P2P Jingle session', error);
3600
+            if (reason !== 'success') {
3601
+                logger.error('An error occurred while trying to terminate P2P Jingle session', error);
3603
             }
3602
             }
3604
         }, {
3603
         }, {
3605
             reason,
3604
             reason,

Loading…
Cancel
Save