Explorar el Código

emit error when expire

ericz hace 12 años
padre
commit
1df647120d
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      lib/peer.js

+ 2 - 1
lib/peer.js

@@ -101,7 +101,8 @@ Peer.prototype._handleServerJSONMessage = function(message) {
       break;
     case 'EXPIRE':
       if (connection) {
-        connection.close('Could not connect to peer ' + connection.peer);
+        connection.close();
+        connection.emit('Could not connect to peer ' + connection.peer);
       }
       break;
     case 'ANSWER':