ericz %!s(int64=12) %!d(string=hai) anos
pai
achega
f56ad047b2
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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');
+  };
 };