Updated for Node 0.10.x

net.createServer no longer emits 'connect' event
This commit is contained in:
Gary Steven 2013-03-30 03:23:58 -07:00
parent 83271e47fc
commit e58cf201ca

View File

@ -38,7 +38,6 @@ function logServer(config) {
var actualAppender = config.actualAppender,
server = net.createServer(function serverCreated(clientSocket) {
clientSocket.setEncoding('utf8');
clientSocket.on('connect', function clientConnected() {
var logMessage = '';
function logTheMessage(msg) {
@ -62,7 +61,7 @@ function logServer(config) {
clientSocket.on('data', chunkReceived);
clientSocket.on('end', chunkReceived);
});
});
server.listen(config.loggerPort || 5000, config.loggerHost || 'localhost');
return actualAppender;