diff --git a/plugin_diana/data/text.go b/plugin_diana/data/text.go index 82ec18da..16232f87 100644 --- a/plugin_diana/data/text.go +++ b/plugin_diana/data/text.go @@ -5,6 +5,7 @@ import ( "crypto/md5" "errors" "io" + "math/rand" "net/http" "os" "sync" @@ -34,7 +35,7 @@ var ( func init() { go func() { - time.Sleep(time.Second) + time.Sleep(time.Second + time.Millisecond*time.Duration(rand.Intn(1000))) err := os.MkdirAll(datapath, 0755) if err != nil { panic(err) diff --git a/plugin_manager/timer/timer.go b/plugin_manager/timer/timer.go index 6007c66b..aab01fa4 100644 --- a/plugin_manager/timer/timer.go +++ b/plugin_manager/timer/timer.go @@ -4,6 +4,7 @@ package timer import ( "fmt" "io" + "math/rand" "os" "strconv" "strings" @@ -41,7 +42,7 @@ var ( func init() { go func() { - time.Sleep(time.Second) + time.Sleep(time.Second + time.Millisecond*time.Duration(rand.Intn(1000))) err := os.MkdirAll(datapath, 0755) if err != nil { panic(err) diff --git a/plugin_reborn/load.go b/plugin_reborn/load.go index 94a1a1f0..4c9495dc 100644 --- a/plugin_reborn/load.go +++ b/plugin_reborn/load.go @@ -3,6 +3,7 @@ package reborn import ( "encoding/json" "io" + "math/rand" "net/http" "os" "time" @@ -30,7 +31,7 @@ var ( func init() { go func() { - time.Sleep(time.Second) + time.Sleep(time.Second + time.Millisecond*time.Duration(rand.Intn(1000))) err := os.MkdirAll(datapath, 0755) if err != nil { panic(err)