From 24b189a91a448af0e323a11fbe2a5129dd08343c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 2 Mar 2024 13:46:59 +0000 Subject: [PATCH] [Fix] Update `nconns` in proxy --- src/rspamd_proxy.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.5