]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix fuzzy sessions counter
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Jul 2020 15:01:38 +0000 (16:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Jul 2020 15:01:38 +0000 (16:01 +0100)
src/fuzzy_storage.c

index f9c66945200a9640eda27575208c341555284751..b8e3d49c2808fc250ff278fe4f259c44ab2c9378 100644 (file)
@@ -1547,6 +1547,7 @@ accept_fuzzy_socket (EV_P_ ev_io *w, int revents)
                                session->time = (guint64) time (NULL);
                                session->addr = rspamd_inet_address_from_sa (MSG_FIELD(msg[i], msg_name),
                                                MSG_FIELD(msg[i], msg_namelen));
+                               worker->nconns++;
 
                                /* Each message can have its length in case of recvmmsg */
 #ifdef HAVE_RECVMMSG
@@ -1556,7 +1557,6 @@ accept_fuzzy_socket (EV_P_ ev_io *w, int revents)
                                if (rspamd_fuzzy_cmd_from_wire (iovs[i].iov_base,
                                                msg_len, session)) {
                                        /* Check shingles count sanity */
-                                       worker->nconns++;
                                        rspamd_fuzzy_process_command (session);
                                }
                                else {