Pārlūkot izejas kodu

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 gadus atpakaļ
vecāks
revīzija
be45cb6523
1 mainītis faili ar 4 papildinājumiem un 5 dzēšanām
  1. 4
    5
      JitsiConference.js

+ 4
- 5
JitsiConference.js Parādīt failu

@@ -3593,13 +3593,12 @@ JitsiConference.prototype._stopP2PSession = function(options = {}) {
3593 3593
             // crash the responder would stay in P2P mode until ICE fails which
3594 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 3598
             // where both initiator and responder terminate their sessions
3598 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 3604
             reason,

Notiek ielāde…
Atcelt
Saglabāt