go easy on rate limits

This commit is contained in:
Thibault Duplessis 2015-11-05 13:45:22 +07:00
parent 9c2a7c5883
commit 9bed58ae79
2 changed files with 3 additions and 3 deletions

View file

@ -19,8 +19,8 @@ object Setup extends LilaController with TheftPrevention {
private def env = Env.setup
private val FormRateLimit = new lila.memo.RateLimitByKey(1 second)
private val PostRateLimit = new lila.memo.RateLimitByKey(1 second)
private val FormRateLimit = new lila.memo.RateLimitByKey(500 millis)
private val PostRateLimit = new lila.memo.RateLimitByKey(500 millis)
def aiForm = Open { implicit ctx =>
if (HTTPRequest isXhr ctx.req) {

View file

@ -24,7 +24,7 @@ private[lobby] final class SocketHandler(
socket: ActorRef,
uid: String,
member: Member): Handler.Controller = {
lazy val RateLimit = new lila.memo.RateLimitGlobal(2 seconds)
lazy val RateLimit = new lila.memo.RateLimitGlobal(1 second)
PartialFunction {
case ("p", o) => o int "v" foreach { v => socket ! PingVersion(uid, v) }
case ("join", o) => RateLimit {