Преглед на файлове

fix #568 and bump version to 1.0.4

afrokick преди 5 години
родител
ревизия
db187161eb
променени са 5 файла, в които са добавени 13 реда и са изтрити 2 реда
  1. 6 0
      changelog.md
  2. 0 0
      dist/peerjs.min.js
  3. 0 0
      dist/peerjs.min.js.map
  4. 6 1
      lib/negotiator.ts
  5. 1 1
      package.json

+ 6 - 0
changelog.md

@@ -2,6 +2,12 @@
 
 All notable changes to this project will be documented in this file.
 
+<a name="1.0.4"></a>
+
+## 1.0.4 (2019-08-31)
+
+- fixed: 'close' event for DataConnection #568
+
 <a name="1.0.3"></a>
 
 ## 1.0.3 (2019-08-21)

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/peerjs.min.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/peerjs.min.js.map


+ 6 - 1
lib/negotiator.ts

@@ -122,7 +122,7 @@ export class Negotiator {
           );
           this.connection.emit(
             ConnectionEventType.Error,
-            new Error("Negotiation of connection to " + peerId + " failed.")
+            new Error("Connection to " + peerId + " closed.")
           );
           this.connection.close();
           break;
@@ -131,6 +131,11 @@ export class Negotiator {
             "iceConnectionState is disconnected, closing connections to " +
             peerId
           );
+          this.connection.emit(
+            ConnectionEventType.Error,
+            new Error("Connection to " + peerId + " disconnected.")
+          );
+          this.connection.close();
           break;
         case "completed":
           peerConnection.onicecandidate = util.noop;

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "peerjs",
-  "version": "1.0.3",
+  "version": "1.0.4",
   "description": "PeerJS client",
   "main": "./dist/peerjs.min.js",
   "repository": {

Някои файлове не бяха показани, защото твърде много файлове са промени