소스 검색

emit close

ericz 12 년 전
부모
커밋
f56ad047b2
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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');
+  };
 };