Эх сурвалжийг харах

don't close connection when iceConnectionState changed to disconnected

afrokick 5 жил өмнө
parent
commit
72e7c176c8

+ 2 - 0
changelog.md

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

+ 1 - 6
dist/peerjs.js

@@ -7803,12 +7803,7 @@ function () {
           break;
 
         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;
 
         case "completed":

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/peerjs.js.map


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/peerjs.min.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/peerjs.min.js.map


+ 1 - 6
lib/negotiator.ts

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

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно