Fix ingress manager unnecessary creation

This commit is contained in:
Zoltán Papp 2025-02-01 10:58:47 +01:00
parent 6344e34880
commit 829e40d2aa

View File

@ -1712,7 +1712,11 @@ func (e *Engine) updateForwardRules(rules []*mgmProto.ForwardingRule) error {
return nil
}
if len(rules) == 0 && e.ingressGatewayMgr != nil {
if len(rules) == 0 {
if e.ingressGatewayMgr == nil {
return nil
}
err := e.ingressGatewayMgr.Close()
e.ingressGatewayMgr = nil
e.statusRecorder.SetIngressGwMgr(nil)