diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-13 13:58:09 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-13 13:58:09 +0000 |
commit | 684996ee80c4b834f10c764a71a7f22dd2f23f83 (patch) | |
tree | 54ebf01447ac6fa4e693d00a952cda580884fd16 /src/plugins/fuzzy_check.c | |
parent | 54e835fc3540cc4dae025976fd15a0ad9cf10833 (diff) | |
download | rspamd-684996ee80c4b834f10c764a71a7f22dd2f23f83.tar.gz rspamd-684996ee80c4b834f10c764a71a7f22dd2f23f83.zip |
[Minor] Add failure reason in the upstreams code
Diffstat (limited to 'src/plugins/fuzzy_check.c')
-rw-r--r-- | src/plugins/fuzzy_check.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 5c3994559..57e9bf8cb 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -2255,7 +2255,7 @@ fuzzy_check_timer_callback (gint fd, short what, void *arg) rspamd_inet_address_to_string_pretty ( rspamd_upstream_addr_cur (session->server)), session->retransmits); - rspamd_upstream_fail (session->server, TRUE); + rspamd_upstream_fail (session->server, TRUE, "timeout"); if (session->item) { rspamd_symcache_item_async_dec_check (session->task, session->item, M); @@ -2337,7 +2337,7 @@ fuzzy_check_io_callback (gint fd, short what, void *arg) session->state == 1 ? "read" : "write", errno, strerror (errno)); - rspamd_upstream_fail (session->server, TRUE); + rspamd_upstream_fail (session->server, TRUE, strerror (errno)); if (session->item) { rspamd_symcache_item_async_dec_check (session->task, session->item, M); @@ -2378,7 +2378,7 @@ fuzzy_controller_timer_callback (gint fd, short what, void *arg) task = session->task; if (session->retransmits >= session->rule->ctx->retransmits) { - rspamd_upstream_fail (session->server, TRUE); + rspamd_upstream_fail (session->server, TRUE, "timeout"); msg_err_task_check ("got IO timeout with server %s(%s), " "after %d retransmits", rspamd_upstream_name (session->server), @@ -2594,7 +2594,7 @@ fuzzy_controller_io_callback (gint fd, short what, void *arg) rspamd_inet_address_to_string_pretty ( rspamd_upstream_addr_cur (session->server)), errno, strerror (errno)); - rspamd_upstream_fail (session->server, FALSE); + rspamd_upstream_fail (session->server, FALSE, strerror (errno)); } /* @@ -2798,7 +2798,7 @@ register_fuzzy_client_call (struct rspamd_task *task, rspamd_inet_address_to_string_pretty (addr), errno, strerror (errno)); - rspamd_upstream_fail (selected, TRUE); + rspamd_upstream_fail (selected, TRUE, strerror (errno)); g_ptr_array_free (commands, TRUE); } else { /* Create session for a socket */ @@ -2924,7 +2924,7 @@ register_fuzzy_controller_call (struct rspamd_http_connection_entry *entry, rspamd_inet_address_to_string_pretty (addr), rule->name, strerror (errno)); - rspamd_upstream_fail (selected, TRUE); + rspamd_upstream_fail (selected, TRUE, strerror (errno)); } else { s = @@ -3287,7 +3287,7 @@ fuzzy_check_send_lua_learn (struct fuzzy_rule *rule, if ((sock = rspamd_inet_address_connect (addr, SOCK_DGRAM, TRUE)) == -1) { - rspamd_upstream_fail (selected, TRUE); + rspamd_upstream_fail (selected, TRUE, strerror (errno)); } else { s = rspamd_mempool_alloc0 (task->task_pool, |