@ -12,11 +12,11 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/gopkg/easylock"
|
||||
"git.zhangdeman.cn/zhangdeman/easylock"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/gopkg/easymap"
|
||||
"git.zhangdeman.cn/zhangdeman/easymap"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/gopkg/util"
|
||||
"git.zhangdeman.cn/zhangdeman/util"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gopkg.in/olahol/melody.v1"
|
||||
)
|
||||
@ -86,7 +86,7 @@ func CloneContext(ctx *WSContext) *WSContext {
|
||||
func generateConnectionID(flag string) string {
|
||||
return fmt.Sprintf("%s-%s-%s-%s",
|
||||
flag,
|
||||
strings.ReplaceAll(util.GetHostIP(), ".", ""),
|
||||
strings.ReplaceAll(util.IP.GetHostIP(), ".", ""),
|
||||
time.Now().Format("20060102150405"),
|
||||
util.Md5(fmt.Sprintf("%d", time.Now().UnixNano())+util.GenRandomString("", 64)))
|
||||
util.String.Md5(fmt.Sprintf("%d", time.Now().UnixNano())+util.String.GenRandom("", 64)))
|
||||
}
|
||||
|
Reference in New Issue
Block a user