From 5665d5454575a28614333793dbfbe13dcd545015 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 7 Feb 2015 13:15:06 +1100 Subject: [PATCH] Test without dropping listen backlog --- src/connector.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/connector.c b/src/connector.c index 950dd26c..028e6f9e 100644 --- a/src/connector.c +++ b/src/connector.c @@ -380,7 +380,6 @@ reparse: void *receiver(void *arg) { cdata_t *cdata = (cdata_t *)arg; - bool dropped_backlog = false; struct epoll_event event; uint64_t serverfds, i; time_t start_t; @@ -414,16 +413,6 @@ void *receiver(void *arg) while (42) { client_instance_t *client; - if (unlikely(!dropped_backlog && time(NULL) - start_t > 90)) { - /* When we first start we listen to as many connections - * as possible. After the first minute we drop the - * listen to the minimum to effectively ratelimit how - * fast we can receive new connections. */ - dropped_backlog = true; - LOGNOTICE("Dropping server listen backlog to 0"); - for (i = 0; i < serverfds; i++) - listen(cdata->serverfd[i], 0); - } while (unlikely(!cdata->accept)) cksleep_ms(10); ret = epoll_wait(epfd, &event, 1, 1000);