From 88423a230104666fe9ec8b9ba8ab6f371a4270f1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 25 Aug 2022 11:25:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=85=8D=E7=BD=AE=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=20=E6=B7=BB=E5=8A=A0=E5=BC=82=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=9C=BA=E5=88=B6=20=E4=BB=A5=E5=85=8D=E4=B8=8A?= =?UTF-8?q?=E5=B1=82=E4=B8=9A=E5=8A=A1=E5=AF=BC=E8=87=B4=E5=BA=95=E5=B1=82?= =?UTF-8?q?=E5=8D=8F=E7=A8=8B=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sys/configure/configure.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/configure/configure.go b/sys/configure/configure.go index 71b2b36a3..356b89040 100644 --- a/sys/configure/configure.go +++ b/sys/configure/configure.go @@ -2,6 +2,7 @@ package configure import ( "fmt" + "go_dreamfactory/lego" "go_dreamfactory/lego/sys/log" "io/fs" "io/ioutil" @@ -192,7 +193,11 @@ func (this *Configure) checkConfigure() { } for _, v := range handle.events { if v != nil { - go v() + go func(f func()) { + defer lego.Recover("configure") + f() + }(v) + } } }