diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-08 16:48:46 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-08 16:48:46 +0100 |
commit | 40668e02907b0e15b9fdfe429a48b20ac98b1e31 (patch) | |
tree | ae9f1df7aa21f58e502b9f6e7a08206394b90244 /src/rspamd_proxy.c | |
parent | 5f2ef07094e6c0b4116f4cc1122c8fe95ee2a651 (diff) | |
download | rspamd-40668e02907b0e15b9fdfe429a48b20ac98b1e31.tar.gz rspamd-40668e02907b0e15b9fdfe429a48b20ac98b1e31.zip |
[Minor] Do not call compare scripts with no master results
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r-- | src/rspamd_proxy.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index bb20306c5..acbdafdb7 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -838,9 +838,11 @@ proxy_session_dtor (struct rspamd_proxy_session *session) gint cbref; struct rspamd_proxy_backend_connection *conn; - for (i = 0; i < session->ctx->cmp_refs->len; i ++) { - cbref = g_array_index (session->ctx->cmp_refs, gint, i); - proxy_call_cmp_script (session, cbref); + if (session->master_conn && session->master_conn->results) { + for (i = 0; i < session->ctx->cmp_refs->len; i++) { + cbref = g_array_index (session->ctx->cmp_refs, gint, i); + proxy_call_cmp_script (session, cbref); + } } if (session->master_conn) { |