From f6bd9e783298b0b5291008f304ccdb6daaa92ce8 Mon Sep 17 00:00:00 2001 From: Alexandre Tiertant Date: Fri, 5 May 2017 14:30:22 +0200 Subject: [PATCH] fix this.log is not a function --- dao/socketServer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dao/socketServer.js b/dao/socketServer.js index 35772e4..cd2e298 100644 --- a/dao/socketServer.js +++ b/dao/socketServer.js @@ -259,6 +259,7 @@ function serverCreated(socket) { } function startServer() { + var self = this; this.log( 'starting server on ',this.path, ((this.port)?`:${this.port}`:'') @@ -289,9 +290,9 @@ function startServer() { this.server.on( 'error', function(err){ - this.log('server error',err); + self.log('server error',err); - this.publish( + self.publish( 'error', err );