Skip to content

Commit 18f45c5

Browse files
committed
Added PHP_FCGI_BACKLOG, overrides the default listen backlog
1 parent 27b01cf commit 18f45c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sapi/cgi/cgi_main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,11 @@ consult the installation file that came with this distribution, or visit \n\
19551955
}
19561956

19571957
if (bindpath) {
1958-
fcgi_fd = fcgi_listen(bindpath, 128);
1958+
int backlog = 128;
1959+
if (getenv("PHP_FCGI_BACKLOG")) {
1960+
backlog = atoi(getenv("PHP_FCGI_BACKLOG"));
1961+
}
1962+
fcgi_fd = fcgi_listen(bindpath, backlog);
19591963
if (fcgi_fd < 0) {
19601964
fprintf(stderr, "Couldn't create FastCGI listen socket on port %s\n", bindpath);
19611965
#ifdef ZTS

0 commit comments

Comments
 (0)