X-Git-Url: https://git.r.bdr.sh/rbdr/cologne/blobdiff_plain/b39688c9e0d42361c2351a2c66068fc634cb6557..941d09019e402ac565101fba6d824bd48504c90b:/lib/loggers/socket.js?ds=inline diff --git a/lib/loggers/socket.js b/lib/loggers/socket.js index ea9d944..b057d77 100644 --- a/lib/loggers/socket.js +++ b/lib/loggers/socket.js @@ -4,6 +4,7 @@ // Load up dependencies if (typeof require === 'function') { var Ne = require('neon'); + var ioClient = require('socket.io-client'); Module = Ne.Module; Class = Ne.Class; } else { @@ -21,17 +22,17 @@ init : function (config) { var logger = this; - logger.socketIo = global.io - if (config) { for (property in config) { logger[property] = config[property]; } } - if (logger.socketIo) { - logger._socket = logger.socketIo.connect(logger.serverUrl); + if (!logger.socketIo) { + logger.socketIo = ioClient; } + + logger._socket = logger.socketIo.connect(logger.serverUrl); }, log : function () {