修复并非写map造成的panic
This commit is contained in:
jinnrry committed 2024-04-20 09:10:13 +08:00
1 parent cc4aa851bc
commit d7fe9ba1a1
12 files changed
+69 -72

No files matched your search

+1 -5
View File
@@ -130,16 +130,12 @@ func Send(ctx *context.Context, w http.ResponseWriter, req *http.Request) {
}
log.WithContext(ctx).Debugf("插件执行--SendBefore")
as := async.New(ctx)
for _, hook := range hooks.HookList {
if hook == nil {
continue
}
as.WaitProcess(func(hk any) {
hk.(framework.EmailHook).SendBefore(ctx, e)
}, hook)
hook.SendBefore(ctx, e)
}
as.Wait()
log.WithContext(ctx).Debugf("插件执行--SendBefore End")
// 邮件落库
+1
View File
@@ -21,6 +21,7 @@ func AcmeChallenge(w http.ResponseWriter, r *http.Request) {
if exist {
w.Write([]byte(auth.KeyAuth))
} else {
log.Errorf("AcmeChallenge Error Token Infos:%+v", instance.AuthInfo)
http.NotFound(w, r)
}
}