]> source.dussan.org Git - rspamd.git/commitdiff
Try to fix hang in upstream events.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 19 Nov 2014 13:16:06 +0000 (13:16 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 19 Nov 2014 13:16:06 +0000 (13:16 +0000)
src/libutil/upstream.c

index b164577c625f331d1f40c3ca40e2738cf82793ea..b2e32642c71778ef56a8ff380c9b2b28ec3ed53a 100644 (file)
@@ -319,7 +319,7 @@ rspamd_upstream_fail (struct upstream *up)
                        max_error_rate = 0;
                }
 
-               if (error_rate > max_error_rate) {
+               if (error_rate > max_error_rate && up->active_idx != -1) {
                        /* Remove upstream from the active list */
                        rspamd_upstream_set_inactive (up->ls, up);
                }