From: Willy Tarreau Date: Fri, 23 Nov 2012 19:11:45 +0000 (+0100) Subject: MINOR: listeners: make the accept loop more robust when maxaccept==0 X-Git-Tag: v1.5-dev14~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50de90a228ec377da8c318c2c0d2bf254f673e95;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/listener.c b/src/listener.c index 7af9adc9b4..22e386e3ae 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;