From: Vsevolod Stakhov Date: Fri, 8 Nov 2019 16:04:26 +0000 (+0000) Subject: [Minor] Increase number of connections merely when we have a session X-Git-Tag: 2.2~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e67550d90d67a4ce42d695f98b173708c73c1adf;p=rspamd.git [Minor] Increase number of connections merely when we have a session --- diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index ac6c692d1..94bbc6484 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -1189,8 +1189,6 @@ accept_fuzzy_socket (EV_P_ ev_io *w, int revents) if (revents == EV_READ) { for (;;) { - worker->nconns++; - r = rspamd_inet_address_recvfrom (w->fd, buf, sizeof (buf), @@ -1219,6 +1217,7 @@ accept_fuzzy_socket (EV_P_ ev_io *w, int revents) session->ctx = worker->ctx; session->time = (guint64) time (NULL); session->addr = addr; + worker->nconns++; if (rspamd_fuzzy_cmd_from_wire (buf, r, session)) { /* Check shingles count sanity */