aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-03-02 13:46:59 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-03-02 13:46:59 +0000
commit24b189a91a448af0e323a11fbe2a5129dd08343c (patch)
treea8b786a4eb16b464bf3cb0d7d208c4683aeaeb76
parent5de62474600c4e0722241f3c31e81633c08aa85c (diff)
downloadrspamd-24b189a91a448af0e323a11fbe2a5129dd08343c.tar.gz
rspamd-24b189a91a448af0e323a11fbe2a5129dd08343c.zip
[Fix] Update `nconns` in proxy
-rw-r--r--src/rspamd_proxy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index 191433aa4..9139866b5 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -1101,6 +1101,8 @@ proxy_session_dtor(struct rspamd_proxy_session *session)
rspamd_mempool_delete(session->pool);
}
+ session->worker->nconns--;
+
g_free(session);
}
@@ -2275,6 +2277,8 @@ proxy_accept_socket(EV_P_ ev_io *w, int revents)
return;
}
+ worker->nconns++;
+
session = g_malloc0(sizeof(*session));
REF_INIT_RETAIN(session, proxy_session_dtor);
session->client_sock = nfd;