summaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-08 16:48:46 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-08 16:48:46 +0100
commit40668e02907b0e15b9fdfe429a48b20ac98b1e31 (patch)
treeae9f1df7aa21f58e502b9f6e7a08206394b90244 /src/rspamd_proxy.c
parent5f2ef07094e6c0b4116f4cc1122c8fe95ee2a651 (diff)
downloadrspamd-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.c8
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) {