Skip to content

Commit

Permalink
chore(websockets): Use ss-engine.io code from one location rather tha…
Browse files Browse the repository at this point in the history
…n two
  • Loading branch information
paulbjensen committed Aug 26, 2015
1 parent 5af594a commit 5378701
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4,273 deletions.
10 changes: 5 additions & 5 deletions lib/socketstream.js
Expand Up @@ -123,7 +123,7 @@ var api = exports.api = {
*
* 'server:start' is emitted when the server starts. If in production the assets will be saved before the event.
*/
var events = exports.events = api.events = new EventEmitter2();
exports.events = api.events = new EventEmitter2();

// Publish Events
var publish = exports.publish = require('./publish/index')();
Expand Down Expand Up @@ -194,7 +194,7 @@ function stream(httpServer) {
var loaded = false;

function load() {
if (loaded) return;
if (loaded) { return; }
loaded = true;

api.log.info('Starting SocketStream %s in %s mode...'.green, version, env);
Expand All @@ -214,7 +214,7 @@ function load() {

function unload() {
loaded = false;

tasks.unload();
client.unload();
http.unload();
Expand All @@ -230,8 +230,8 @@ function unload() {
*/
function start() {

var plan = tasks.plan(arguments),
server = getServer();
var plan = tasks.plan(arguments);
getServer();

// Hook in streaming if called with HTTP server
if (plan.httpServer) {
Expand Down
2 changes: 1 addition & 1 deletion lib/websocket/transport.js
Expand Up @@ -30,7 +30,7 @@ module.exports = function(ss, emitter) {
},
load: function(httpServer, sessionOptions) {
if (transport == null) {
this.use('engineio');
this.use(require('ss-engineio'));
}
return transport(ss, emitter, httpServer, config, sessionOptions);
}
Expand Down

0 comments on commit 5378701

Please sign in to comment.