From 019baed9a8ee144ca80723a9efcd0b31aeb134d7 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Fri, 29 Oct 2021 09:36:06 +0800 Subject: [PATCH] update --- core/otto.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/otto.go b/core/otto.go index ed84994..3fa40c9 100644 --- a/core/otto.go +++ b/core/otto.go @@ -5,7 +5,6 @@ import ( "fmt" "io" "io/ioutil" - "log" "os" "regexp" "strings" @@ -22,7 +21,6 @@ type JsReply string var o = NewBucket("otto") func init() { - go func() { time.Sleep(time.Second) { @@ -45,7 +43,11 @@ var OttoFuncs = map[string]func(string) string{ // } id, err := machineid.ProtectedID("sillyGirl") if err != nil { - log.Fatal(err) + id = sillyGirl.Get("machineId") + if id == "" { + id = GetUUID() + sillyGirl.Set("machineId", id) + } } return id },