Skip to content

Commit

Permalink
Remove usage of RedisStore, too buggy..
Browse files Browse the repository at this point in the history
See socketio/socket.io#862, 100% cpu usage
  • Loading branch information
sinamt committed Oct 5, 2012
1 parent 9fada92 commit 12c1de8
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions lib/ws_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,10 @@ module.exports = function(options) {
util = require('util'),
rest = require('restler'),
io = require('socket.io').listen(options.web_port),
serverlog = winston.loggers.get('server'),
RedisStore = require('socket.io/lib/stores/redis');

serverlog = winston.loggers.get('server');

io.configure(function (){

if (options.redisClient) {
// Use RedisStore for scaling out server
io.set('store', new RedisStore({
redisClient: options.redisClient,
redisPub: options.redisPub,
redisSub: options.redisSub
}));
}

// Authorize via session ownership check
io.set('authorization', function (handshakeData, callback) {
if (handshakeData.query.userid && handshakeData.query.sessionid) {
Expand Down

0 comments on commit 12c1de8

Please sign in to comment.