From 80782b289f2a9e9624e13c805f8306399f03b746 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Wed, 10 Jan 2024 11:10:43 +0000 Subject: [PATCH] Set default listen backlog size back to 128 --- mongoose.h | 5 ++++- src/arch_rtx.h | 3 +++ src/config.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mongoose.h b/mongoose.h index aa4b815d..2cbff086 100644 --- a/mongoose.h +++ b/mongoose.h @@ -318,6 +318,9 @@ static inline int mg_mkdir(const char *path, mode_t mode) { !defined MG_ENABLE_RL && (!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP) && \ (!defined(MG_ENABLE_TCPIP) || !MG_ENABLE_TCPIP) #define MG_ENABLE_RL 1 +#ifndef MG_SOCK_LISTEN_BACKLOG_SIZE +#define MG_SOCK_LISTEN_BACKLOG_SIZE 3 +#endif #endif #endif @@ -783,7 +786,7 @@ struct timeval { #endif #ifndef MG_SOCK_LISTEN_BACKLOG_SIZE -#define MG_SOCK_LISTEN_BACKLOG_SIZE 3 +#define MG_SOCK_LISTEN_BACKLOG_SIZE 128 #endif #ifndef MG_DIRSEP diff --git a/src/arch_rtx.h b/src/arch_rtx.h index ff312f57..c649d62c 100644 --- a/src/arch_rtx.h +++ b/src/arch_rtx.h @@ -36,6 +36,9 @@ static inline int mg_mkdir(const char *path, mode_t mode) { !defined MG_ENABLE_RL && (!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP) && \ (!defined(MG_ENABLE_TCPIP) || !MG_ENABLE_TCPIP) #define MG_ENABLE_RL 1 +#ifndef MG_SOCK_LISTEN_BACKLOG_SIZE +#define MG_SOCK_LISTEN_BACKLOG_SIZE 3 +#endif #endif #endif diff --git a/src/config.h b/src/config.h index 9fec6c4e..e480c03f 100644 --- a/src/config.h +++ b/src/config.h @@ -110,7 +110,7 @@ #endif #ifndef MG_SOCK_LISTEN_BACKLOG_SIZE -#define MG_SOCK_LISTEN_BACKLOG_SIZE 3 +#define MG_SOCK_LISTEN_BACKLOG_SIZE 128 #endif #ifndef MG_DIRSEP