From 4ea85e9a35cb4ed4b53f7b4201b6f45f5ebec92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BE=84=E6=BD=AD?= Date: Wed, 20 Dec 2023 19:05:04 +0800 Subject: [PATCH] support empty config with custom config func (#718) --- plugins/wasm-go/pkg/wrapper/plugin_wrapper.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/wasm-go/pkg/wrapper/plugin_wrapper.go b/plugins/wasm-go/pkg/wrapper/plugin_wrapper.go index 3b761362f..ee311eaa4 100644 --- a/plugins/wasm-go/pkg/wrapper/plugin_wrapper.go +++ b/plugins/wasm-go/pkg/wrapper/plugin_wrapper.go @@ -159,8 +159,7 @@ func (ctx *CommonPluginCtx[PluginConfig]) OnPluginStart(int) types.OnPluginStart var jsonData gjson.Result if len(data) == 0 { if ctx.vm.hasCustomConfig { - ctx.vm.log.Warn("need config") - return types.OnPluginStartStatusFailed + ctx.vm.log.Warn("config is empty, but has ParseConfigFunc") } } else { if !gjson.ValidBytes(data) {