commit e67550d: [Minor] Increase number of connections merely when we have a session

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Nov 8 16:07:06 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-11-08 16:04:26 +0000
URL: https://github.com/rspamd/rspamd/commit/e67550d90d67a4ce42d695f98b173708c73c1adf (HEAD -> master)

[Minor] Increase number of connections merely when we have a session

---
 src/fuzzy_storage.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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 */


More information about the Commits mailing list