Skip to content

Commit ccf8394

Browse files
committed
if we default to 1 then we need to also accomodate that in the comparison
1 parent 43653f3 commit ccf8394

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_modules/haproxy_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def construct_line(self, name, host, loop_index=None):
4040

4141
if 'mine_setbackup' in server and server['mine_setbackup']:
4242
if not('extra' in server and 'backup' in server['extra']):
43-
if weight < server['mine_max_weight']:
43+
if weight < server['mine_max_weight'] - 1:
4444
line_elements.append('backup')
4545

4646
return ' '.join(line_elements)

0 commit comments

Comments
 (0)