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

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