Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socket: Use a default listen backlog of -1 on Linux #1387

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/nxt_listen_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ typedef struct {
} nxt_listen_socket_t;


#if (NXT_FREEBSD || NXT_MACOSX || NXT_OPENBSD)
#if (NXT_LINUX || NXT_FREEBSD || NXT_MACOSX || NXT_OPENBSD)
/*
* A backlog is limited by system-wide sysctl kern.ipc.somaxconn.
* This is supported by FreeBSD 2.2, OpenBSD 2.0, and MacOSX.
* A backlog is limited by system-wide sysctl {net.core,kern.ipc}.somaxconn.
* This is supported by Linux, FreeBSD 2.2, OpenBSD 2.0, and MacOSX.
*/
#define NXT_LISTEN_BACKLOG -1

#else
/*
* Linux, Solaris, and NetBSD treat negative value as 0.
* Solaris and NetBSD treat negative value as 0.
* 511 is a safe default.
*/
#define NXT_LISTEN_BACKLOG 511
Expand Down
Loading