From 558e708576a5fcb148fec69453b40d3625481a53 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 5 Mar 2015 17:32:40 -0500 Subject: [PATCH] remove console.log --- src/socket.io/index.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index d2f97f8186..ba4f324d7c 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -70,7 +70,7 @@ function onConnect(socket) { if (err || !userData) { return; } - + socket.emit('event:connect'); if (userData.status !== 'offline') { socket.broadcast.emit('event:user_status_change', {uid: socket.uid, status: userData.status || 'online'}); @@ -164,21 +164,18 @@ function requireModules() { } function authorize(socket, callback) { - var handshake = socket.request, - sessionID; + var handshake = socket.request; if (!handshake) { return callback(new Error('[[error:not-authorized]]')); } - + async.waterfall([ function(next) { cookieParser(handshake, {}, next); }, function(next) { - var sessionID = handshake.signedCookies['express.sid']; - console.log(next, sessionID) - db.sessionStore.get(sessionID, next); + db.sessionStore.get(handshake.signedCookies['express.sid'], next); }, function(sessionData, next) { if (sessionData && sessionData.passport && sessionData.passport.user) {