Browse Source

fix #568 and bump version to 1.0.4

afrokick 5 years ago
parent
commit
db187161eb
5 changed files with 13 additions and 2 deletions
  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.
 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>
 <a name="1.0.3"></a>
 
 
 ## 1.0.3 (2019-08-21)
 ## 1.0.3 (2019-08-21)

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


+ 6 - 1
lib/negotiator.ts

@@ -122,7 +122,7 @@ export class Negotiator {
           );
           );
           this.connection.emit(
           this.connection.emit(
             ConnectionEventType.Error,
             ConnectionEventType.Error,
-            new Error("Negotiation of connection to " + peerId + " failed.")
+            new Error("Connection to " + peerId + " closed.")
           );
           );
           this.connection.close();
           this.connection.close();
           break;
           break;
@@ -131,6 +131,11 @@ export class Negotiator {
             "iceConnectionState is disconnected, closing connections to " +
             "iceConnectionState is disconnected, closing connections to " +
             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;

+ 1 - 1
package.json

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

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