Skip to content

Commit b985a31

Browse files
committed
sapi/fpm: setting backlog default to -1 for DragonFlyBSD.
like most of BSD, when negative the syscall sets it internally to SOMAXCONN. close GH-13077
1 parent 08b9e8a commit b985a31

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ DOM:
2626
FPM:
2727
. Implement GH-12385 (flush headers without body when calling flush()).
2828
(nielsdos)
29+
. Added DragonFlyBSD system to the list which set FPM_BACKLOG_DEFAULT
30+
to SOMAXCONN. (David Carlier)
2931

3032
FTP:
3133
. Removed the deprecated inet_ntoa call support. (David Carlier)

sapi/fpm/fpm/fpm_sockets.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
#include "fpm_worker_pool.h"
1616

1717
/*
18-
On Linux, FreeBSD, OpenBSD and macOS, backlog negative values are truncated to SOMAXCONN
18+
On Linux, FreeBSD, OpenBSD, DragonFlyBSD and macOS, backlog negative values are truncated to SOMAXCONN
1919
*/
20-
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__) || defined(__APPLE__)
20+
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__) || \
21+
defined(__DragonFly__) || defined(__APPLE__)
2122
#define FPM_BACKLOG_DEFAULT -1
2223
#else
2324
#define FPM_BACKLOG_DEFAULT 511

0 commit comments

Comments
 (0)