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.
This commit is contained in:
Willy Tarreau 2012-11-23 20:11:45 +01:00
parent ca57de3e7b
commit 50de90a228

View File

@ -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;