diff --git a/lib/workers/socketioworker.js b/lib/workers/socketioworker.js index 3831330..99f7ed3 100644 --- a/lib/workers/socketioworker.js +++ b/lib/workers/socketioworker.js @@ -15,7 +15,17 @@ util.inherits(SocketIOWorker, BaseWorker); SocketIOWorker.prototype.createClient = function (callback) { var self = this; - var client = io.connect(this.server, { 'force new connection' : true}); + var options = { + 'force new connection' : true + }; + if (self.generator.options) { + for (var k in self.generator.options) { + if (self.generator.options[k] !== null || self.generator.options[k] !== '') { + options[k] = self.generator.options[k]; + } + } + } + var client = io.connect(this.server, options); client.on('connect', function () { callback(false, client);