From 12904ec9ff0b38c4c90f4b1ee11fd8d1adc09139 Mon Sep 17 00:00:00 2001 From: Kisoo Han Date: Wed, 26 Jul 2023 13:21:21 +0900 Subject: [PATCH] [CBRD-24908] [win] use SOMAXCONN_HINT to obtain actual backlog value (#4512) [win] use SOMAXCONN_HINT for listen backlog --- src/broker/broker.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/broker/broker.c b/src/broker/broker.c index 466e954f16d..9cf7002671c 100644 --- a/src/broker/broker.c +++ b/src/broker/broker.c @@ -1408,7 +1408,11 @@ init_env (void) return (-1); } +#if defined (WINDOWS) + if (listen (sock_fd, SOMAXCONN_HINT (shm_appl->job_queue_size)) < 0) +#else if (listen (sock_fd, shm_appl->job_queue_size) < 0) +#endif { UW_SET_ERROR_CODE (UW_ER_CANT_BIND, 0); return (-1);