Skip to content

Commit 67b6ac4

Browse files
committed
BUG/MEDIUM: http rules: ineffectual delete operation when refreshing rules
1 parent 6e6f97f commit 67b6ac4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controller/haproxy/rules.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (r Rules) Refresh(client api.HAProxyClient) (reload bool) {
183183
id := getID(ruleSet[i])
184184
if ftRules.status[id] == TO_DELETE {
185185
delete(ftRules.status, id)
186-
ftRules.rules[ruleType] = append(ruleSet[:i], ruleSet[i+1:]...)
186+
ruleSet = append(ruleSet[:i], ruleSet[i+1:]...)
187187
continue
188188
}
189189
if ftRules.status[id]&INGRESS != 0 {
@@ -195,6 +195,7 @@ func (r Rules) Refresh(client api.HAProxyClient) (reload bool) {
195195
reload = true
196196
}
197197
}
198+
ftRules.rules[ruleType] = ruleSet
198199
}
199200
}
200201
return reload

0 commit comments

Comments
 (0)