Blame SOURCES/memcached-fix-rejconn-counting.patch

51bd1a
commit d5b1c3f5f8abc2f51ed493e5a41826d510f95cbb
51bd1a
Author: dormando <dormando@rydia.net>
51bd1a
Date:   Fri Mar 6 00:36:39 2020 -0800
51bd1a
51bd1a
    fix: all new connections were counted as rejected
51bd1a
    
51bd1a
    from an earlier patch from a static analyzer... :(
51bd1a
51bd1a
diff --git a/memcached.c b/memcached.c
51bd1a
index b560b32..ed3fc7d 100644
51bd1a
--- a/memcached.c
51bd1a
+++ b/memcached.c
51bd1a
@@ -6668,7 +6668,9 @@ static void drive_machine(conn *c) {
51bd1a
             if (settings.maxconns_fast) {
51bd1a
                 STATS_LOCK();
51bd1a
                 reject = stats_state.curr_conns + stats_state.reserved_fds >= settings.maxconns - 1;
51bd1a
-                stats.rejected_conns++;
51bd1a
+                if (reject) {
51bd1a
+                    stats.rejected_conns++;
51bd1a
+                }
51bd1a
                 STATS_UNLOCK();
51bd1a
             } else {
51bd1a
                 reject = false;