Bladeren bron

don't close connection when iceConnectionState changed to disconnected

afrokick 5 jaren geleden
bovenliggende
commit
72e7c176c8
6 gewijzigde bestanden met toevoegingen van 4 en 12 verwijderingen
  1. 2 0
      changelog.md
  2. 1 6
      dist/peerjs.js
  3. 0 0
      dist/peerjs.js.map
  4. 0 0
      dist/peerjs.min.js
  5. 0 0
      dist/peerjs.min.js.map
  6. 1 6
      lib/negotiator.ts

+ 2 - 0
changelog.md

@@ -4,6 +4,8 @@ All notable changes will be documented in this file.
 
 
 ## vNEXT
 ## vNEXT
 
 
+- changed: don't close the Connection if `iceConnectionState` changed to `disconnected`
+
 <a name="1.2.0"></a>
 <a name="1.2.0"></a>
 
 
 ## 1.2.0 (2019-12-24)
 ## 1.2.0 (2019-12-24)

+ 1 - 6
dist/peerjs.js

@@ -7803,12 +7803,7 @@ function () {
           break;
           break;
 
 
         case "disconnected":
         case "disconnected":
-          logger_1.default.log("iceConnectionState is disconnected, closing connections to " + peerId);
-
-          _this.connection.emit(enums_1.ConnectionEventType.Error, new Error("Connection to " + peerId + " disconnected."));
-
-          _this.connection.close();
-
+          logger_1.default.log("iceConnectionState changed to disconnected on the connection with " + peerId);
           break;
           break;
 
 
         case "completed":
         case "completed":

File diff suppressed because it is too large
+ 0 - 0
dist/peerjs.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/peerjs.min.js


File diff suppressed because it is too large
+ 0 - 0
dist/peerjs.min.js.map


+ 1 - 6
lib/negotiator.ts

@@ -107,14 +107,9 @@ export class Negotiator {
           break;
           break;
         case "disconnected":
         case "disconnected":
           logger.log(
           logger.log(
-            "iceConnectionState is disconnected, closing connections to " +
+            "iceConnectionState changed to disconnected on the connection with " +
             peerId
             peerId
           );
           );
-          this.connection.emit(
-            ConnectionEventType.Error,
-            new Error("Connection to " + peerId + " disconnected.")
-          );
-          this.connection.close();
           break;
           break;
         case "completed":
         case "completed":
           peerConnection.onicecandidate = util.noop;
           peerConnection.onicecandidate = util.noop;

Some files were not shown because too many files changed in this diff