mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
connID to md5
This commit is contained in:
parent
27a1197a97
commit
4547e809bf
@ -44,7 +44,7 @@ func (c *UserConnContext) ErrReturn(error string, code int) {
|
|||||||
http.Error(c.RespWriter, error, code)
|
http.Error(c.RespWriter, error, code)
|
||||||
}
|
}
|
||||||
func (c *UserConnContext) GetConnID() string {
|
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 {
|
func (c *UserConnContext) GetUserID() string {
|
||||||
return c.Req.URL.Query().Get(WsUserID)
|
return c.Req.URL.Query().Get(WsUserID)
|
||||||
|
1
pkg/common/db/cache/rockscache.go
vendored
1
pkg/common/db/cache/rockscache.go
vendored
@ -1,7 +1,6 @@
|
|||||||
package cache
|
package cache
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"OpenIM/pkg/common/log"
|
|
||||||
"OpenIM/pkg/utils"
|
"OpenIM/pkg/utils"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user