Commit cc7ac818 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

commit

parent 678f5162
......@@ -410,7 +410,7 @@ func (s *wafService) EnableListenerWaf(ctx context.Context, req *EnableListenerW
}
if listener.Enable {
s.CreateWaf(ctx, &CreateWafReq{
_, err := s.CreateWaf(ctx, &CreateWafReq{
GatewateInfo: GatewateInfo{
GatewayName: req.GatewayName,
Namespace: req.Namespace,
......@@ -419,8 +419,11 @@ func (s *wafService) EnableListenerWaf(ctx context.Context, req *EnableListenerW
Port: uint32(req.Port),
Host: wafService.Host,
})
if err != nil {
return err
}
} else {
s.DeleteListenerWaf(ctx, &DeleteListenerReq{
err = s.DeleteListenerWaf(ctx, &DeleteListenerReq{
GatewateInfo: GatewateInfo{
GatewayName: req.GatewayName,
Namespace: req.Namespace,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment