diff --git a/internal/msggateway/context.go b/internal/msggateway/context.go index 93d62cb19..1ea4f1f13 100644 --- a/internal/msggateway/context.go +++ b/internal/msggateway/context.go @@ -44,7 +44,7 @@ func (c *UserConnContext) ErrReturn(error string, code int) { http.Error(c.RespWriter, error, code) } func (c *UserConnContext) GetConnID() string { - return c.RemoteAddr + "_" + strconv.Itoa(int(utils.GetCurrentTimestampByMill())) + return utils.Md5(c.RemoteAddr + "_" + strconv.Itoa(int(utils.GetCurrentTimestampByMill()))) } func (c *UserConnContext) GetUserID() string { return c.Req.URL.Query().Get(WsUserID) diff --git a/pkg/common/db/cache/rockscache.go b/pkg/common/db/cache/rockscache.go index 1969da554..ff91bebaf 100644 --- a/pkg/common/db/cache/rockscache.go +++ b/pkg/common/db/cache/rockscache.go @@ -1,7 +1,6 @@ package cache import ( - "OpenIM/pkg/common/log" "OpenIM/pkg/utils" "context" "encoding/json"