Browse Source

emit close

ericz 12 năm trước cách đây
mục cha
commit
f56ad047b2
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      lib/connection.js

+ 3 - 0
lib/connection.js

@@ -150,6 +150,9 @@ DataConnection.prototype._configureDataChannel = function() {
   this._dc.onmessage = function(e) {
     self._handleDataMessage(e);
   };
+  this._dc.onclose = function(e) {
+    self.emit('close');
+  };
 };