From e7ab0a67cce78def2f3bd473a73fb6b695337164 Mon Sep 17 00:00:00 2001 From: Anand Kumar Shaw Date: Thu, 2 Jul 2026 18:56:50 +0000 Subject: [PATCH] bmcweb: Fix LTPC connection handling Allow exactly 200 active HTTPS connections by fixing an off-by-one error in the connection limit check. Also close connections on write failures to ensure connection slots are released promptly and prevent WebUI and Redfish from becoming unresponsive after LTPC stress testing. Signed-off-by: Anand Kumar Shaw --- http/http_connection.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http/http_connection.hpp b/http/http_connection.hpp index f4fe240c2d..d68bc05bcc 100644 --- a/http/http_connection.hpp +++ b/http/http_connection.hpp @@ -209,7 +209,7 @@ class Connection : { BMCWEB_LOG_DEBUG("{} Connection started, total {}", logPtr(this), connectionCount); - if (connectionCount >= 200) + if (connectionCount > 200) { BMCWEB_LOG_CRITICAL("{} Max connection count exceeded.", logPtr(this)); @@ -798,6 +798,7 @@ class Connection : if (ec) { BMCWEB_LOG_DEBUG("{} from write(2)", logPtr(this)); + gracefulClose(); return; }