Fix event sent by EventEmitter classes

This commit is contained in:
2014-11-05 01:17:57 +01:00
parent b1ab5822a7
commit 405d5751fb
5 changed files with 102 additions and 52 deletions

View File

@@ -9,10 +9,12 @@ function createServer(port, host, authentication, connected) {
console.log("Incomming connexion");
var ctrl = new Controler(connexion, function(pwd) {
ctrl.on("startupDone", function() {
connected.call(null, ctrl);
});
return authentication.call(null, pwd);
});
connected.call(null, ctrl);
});
host = host || "127.0.0.1";