]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Sequential upstreams iteration is special
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 9 Nov 2019 09:30:04 +0000 (09:30 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 9 Nov 2019 09:30:04 +0000 (09:30 +0000)
src/libutil/upstream.c

index 0e0c3707b078be15fed5cd15d8d7449243147cf5..94d694d7760c954c7d94074fc39c432229d3dd87 100644 (file)
@@ -1475,7 +1475,7 @@ rspamd_upstream_get_common (struct upstream_list *ups,
        }
        RSPAMD_UPSTREAM_UNLOCK (ups);
 
-       if (ups->alive->len == 1) {
+       if (ups->alive->len == 1 && default_type != RSPAMD_UPSTREAM_SEQUENTIAL) {
                /* Fast path */
                up =  g_ptr_array_index (ups->alive, 0);
                goto end;