From 50de90a228ec377da8c318c2c0d2bf254f673e95 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 23 Nov 2012 20:11:45 +0100 Subject: [PATCH] MINOR: listeners: make the accept loop more robust when maxaccept==0 If some listeners are mistakenly configured with 0 as the maxaccept value, then we now consider them as limited to one accept() at a time. This will avoid some issues as fixed by the past commit. --- src/listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/listener.c b/src/listener.c index 7af9adc9b..22e386e3a 100644 --- a/src/listener.c +++ b/src/listener.c @@ -252,7 +252,7 @@ void listener_accept(int fd) { struct listener *l = fdtab[fd].owner; struct proxy *p = l->frontend; - int max_accept = l->maxaccept; + int max_accept = l->maxaccept ? l->maxaccept : 1; int cfd; int ret;