diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-02 20:28:59 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 20:28:59 +0600 |
commit | f93ad4626bbc33d5ce0f3a25042fe1ef9fbf4c7a (patch) | |
tree | a8b786a4eb16b464bf3cb0d7d208c4683aeaeb76 | |
parent | 5de62474600c4e0722241f3c31e81633c08aa85c (diff) | |
parent | 24b189a91a448af0e323a11fbe2a5129dd08343c (diff) | |
download | rspamd-f93ad4626bbc33d5ce0f3a25042fe1ef9fbf4c7a.tar.gz rspamd-f93ad4626bbc33d5ce0f3a25042fe1ef9fbf4c7a.zip |
Merge pull request #4852 from rspamd/vstakhov-proxy-nconns
Update `nconns` in proxy
-rw-r--r-- | src/rspamd_proxy.c | 4 |
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; |