From 5963fbae8ee06329e347d5fe113c649ed1aa179e Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sat, 22 Sep 2007 18:59:05 +0000 Subject: r1378 merge: set default listen() backlog to 511 on all platforms except FreeBSD --- src/os/unix/ngx_freebsd_config.h | 3 +++ src/os/unix/ngx_linux_config.h | 3 +++ src/os/unix/ngx_posix_config.h | 3 +++ src/os/unix/ngx_solaris_config.h | 3 +++ src/os/win32/ngx_win32_config.h | 3 +++ 5 files changed, 15 insertions(+) (limited to 'src/os') diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h index a4e973dc3..06cdb863c 100644 --- a/src/os/unix/ngx_freebsd_config.h +++ b/src/os/unix/ngx_freebsd_config.h @@ -77,6 +77,9 @@ #endif +#define NGX_LISTEN_BACKLOG -1 + + #if (defined SO_ACCEPTFILTER && !defined NGX_HAVE_DEFERRED_ACCEPT) #define NGX_HAVE_DEFERRED_ACCEPT 1 #endif diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h index 980e05d67..3e0475ffc 100644 --- a/src/os/unix/ngx_linux_config.h +++ b/src/os/unix/ngx_linux_config.h @@ -78,6 +78,9 @@ extern ssize_t sendfile(int s, int fd, int32_t *offset, size_t size); #endif +#define NGX_LISTEN_BACKLOG 511 + + #if defined TCP_DEFER_ACCEPT && !defined NGX_HAVE_DEFERRED_ACCEPT #define NGX_HAVE_DEFERRED_ACCEPT 1 #endif diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h index 8a9509960..f79657654 100644 --- a/src/os/unix/ngx_posix_config.h +++ b/src/os/unix/ngx_posix_config.h @@ -88,6 +88,9 @@ #endif +#define NGX_LISTEN_BACKLOG 511 + + #if (__FreeBSD__) && (__FreeBSD_version < 400017) #include /* ALIGN() */ diff --git a/src/os/unix/ngx_solaris_config.h b/src/os/unix/ngx_solaris_config.h index 9183bb360..989a30e2c 100644 --- a/src/os/unix/ngx_solaris_config.h +++ b/src/os/unix/ngx_solaris_config.h @@ -82,6 +82,9 @@ #endif +#define NGX_LISTEN_BACKLOG 511 + + #ifndef NGX_HAVE_INHERITED_NONBLOCK #define NGX_HAVE_INHERITED_NONBLOCK 1 #endif diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h index 6bdc57c08..fcc89c385 100644 --- a/src/os/win32/ngx_win32_config.h +++ b/src/os/win32/ngx_win32_config.h @@ -148,6 +148,9 @@ typedef int sig_atomic_t; #define NGX_WIN_NT 200000 +#define NGX_LISTEN_BACKLOG 511 + + #ifndef NGX_HAVE_INHERITED_NONBLOCK #define NGX_HAVE_INHERITED_NONBLOCK 1 #endif -- cgit