dont allow socket.emits during maintenance mode
This commit is contained in:
barisusakli
2017-02-03 19:02:38 +03:00
parent 06bf631445
commit a15aaaf389
7 changed files with 210 additions and 221 deletions

View File

@@ -3,7 +3,7 @@
'use strict';
var winston = require('winston');
var ratelimit = {};
var ratelimit = module.exports;
var allowedCalls = 100;
var timeframe = 10000;
@@ -31,5 +31,3 @@ ratelimit.isFlooding = function (socket) {
socket.lastCallTime = now;
return false;
};
module.exports = ratelimit;