From 38cf9933bed89a925db3b71384ab4cdd53b70bd3 Mon Sep 17 00:00:00 2001 From: Star Date: Fri, 2 May 2025 09:09:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dwatch=E6=97=B6=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=9C=8D=E5=8A=A1bug=EF=BC=88=E9=87=8D=E5=88=B6config?= =?UTF-8?q?ed=20=3D=20false=E4=BB=A5=E9=87=8D=E6=96=B0=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=85=8D=E7=BD=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/service.go b/service.go index 4c13e76..19a9049 100644 --- a/service.go +++ b/service.go @@ -115,6 +115,7 @@ func initConfig(opt *gojs.Obj, logger *log.Logger, vm *goja.Runtime) { // 身份验证和Session authAccessToken := len(s.Config.AccessTokens) > 0 s.SetClientKeys(serviceConfig.DeviceKey, serviceConfig.ClientKey, serviceConfig.SessionKey) + fmt.Println(u.BMagenta("=====>>>>> 1"), serviceConfig.SessionKey) if serviceConfig.SessionKey != "" { s.SetAuthChecker(func(authLevel int, logger *log.Logger, url *string, args map[string]any, request *s.Request, response *s.Response, options *s.WebServiceOptions) (pass bool, object any) { var session *Session @@ -287,6 +288,7 @@ func init() { server = s.AsyncStart() waitChan = make(chan bool, 1) server.OnStop(func() { + configed = false if onStop != nil { onStop(nil) }