diff options
author | Heiko Schlichting <heiko@fu-berlin.de> | 2021-02-19 11:14:36 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-02-19 11:53:16 +0000 |
commit | 83811e3c1b8189c0a725ec53df699730e7767263 (patch) | |
tree | f1b02fa38f2114120241e4e0545aa461df5e4adc /src | |
parent | 6296a393aeab9fecc38916dfcbf1c94d54691650 (diff) |
Fix weight calculation for socks_proxy. Bug 2694
Diffstat (limited to 'src')
-rw-r--r-- | src/src/transports/smtp_socks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/src/transports/smtp_socks.c b/src/src/transports/smtp_socks.c index 41dc78147..cd8ed3e6d 100644 --- a/src/src/transports/smtp_socks.c +++ b/src/src/transports/smtp_socks.c @@ -190,7 +190,7 @@ for (rnd = random() % weights, i = 0; i < nproxies; i++) { sd = &proxies[i]; if (!sd->is_failed && sd->priority == pri) - if ((rnd -= sd->weight) <= 0) + if ((rnd -= sd->weight) < 0) return i; } |