Skip to content

Commit f26cdd4

Browse files
committed
updated error message
1 parent 870f709 commit f26cdd4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cns/middlewares/k8sSwiftV2_windows.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ var errIngress error
2020
var errEgress error
2121

2222
func init() {
23-
defaultDenyEgressPolicy, err = getEndpointPolicy(policy.ACLPolicy, cns.ActionTypeBlock, cns.DirectionTypeIn, 10_000)
24-
if err != nil {
25-
logger.Errorf("failed to add default deny egress acl's for pod with err %v", err)
23+
defaultDenyEgressPolicy, errIngress = getEndpointPolicy(policy.ACLPolicy, cns.ActionTypeBlock, cns.DirectionTypeIn, 10_000)
24+
if errIngress != nil {
25+
logger.Errorf("failed to add default deny egress acl's for pod with err %v", errIngress)
2626
}
27-
defaultDenyIngressPolicy, err = getEndpointPolicy(policy.ACLPolicy, cns.ActionTypeBlock, cns.DirectionTypeOut, 10_000)
28-
if err != nil {
29-
logger.Errorf("failed to add default deny ingress acl's for pod with err %v", err)
27+
defaultDenyIngressPolicy, errEgress = getEndpointPolicy(policy.ACLPolicy, cns.ActionTypeBlock, cns.DirectionTypeOut, 10_000)
28+
if errEgress != nil {
29+
logger.Errorf("failed to add default deny ingress acl's for pod with err %v", errEgress)
3030
}
3131
}
3232

0 commit comments

Comments
 (0)