From 276db7e068745adbd3422e6c9bb77ce12cb53618 Mon Sep 17 00:00:00 2001 From: 3136352472 <3136352472> Date: Tue, 2 Jun 2020 13:16:09 +0800 Subject: [PATCH] fix --- govue/cmd/main.go | 3 +-- pool/pool.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/govue/cmd/main.go b/govue/cmd/main.go index 03ec25e..20a5423 100644 --- a/govue/cmd/main.go +++ b/govue/cmd/main.go @@ -8,7 +8,6 @@ import ( "github.com/google/uuid" "log" "mime" - "net/http" "path/filepath" ) @@ -92,7 +91,7 @@ func main() { } if extData["cookie"].(map[string]string)["extdatasessionkey"] == "" { - context.SetCookie("extdatasessionkey", uuid.Must(uuid.NewUUID()).String(), 0, "", context.Request.Host, http.SameSiteLaxMode, false, false) + context.SetCookie("extdatasessionkey", uuid.Must(uuid.NewUUID()).String(), 0, "", context.Request.Host, false, false) } raw, err := gv.LoadStaticResources(context.Request, extData) diff --git a/pool/pool.go b/pool/pool.go index af597ad..2dc96c3 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -69,7 +69,7 @@ func NewJsRuntimePool(mainScript string, useFileName string, staticPath string, }() for { jrp.jsRuntimePool.PreparePool(jrp.ctx) - time.Sleep(time.Second * 2) + time.Sleep(time.Second) } } go preparePoolTask() @@ -78,7 +78,7 @@ func NewJsRuntimePool(mainScript string, useFileName string, staticPath string, useSrcTask = func() { defer func() { recover() - time.Sleep(time.Second * 3) + time.Sleep(time.Second) useSrcTask() }() for {