debug3
This commit is contained in:
parent
eaf04ae02d
commit
e97bd859fc
@ -194,8 +194,8 @@ func (o *ChatRoom) Register(c *Client) (sessionId string) {
|
|||||||
// message: 消息内容
|
// message: 消息内容
|
||||||
func (o *ChatRoom) SendSessionMessage(sender *accountFiee.ChatUserData, sessionId string, msgType WsType, message any) (userIdInSession []int64, err error) {
|
func (o *ChatRoom) SendSessionMessage(sender *accountFiee.ChatUserData, sessionId string, msgType WsType, message any) (userIdInSession []int64, err error) {
|
||||||
fmt.Println("ChatRoom.SendSessionMessage ------------------1")
|
fmt.Println("ChatRoom.SendSessionMessage ------------------1")
|
||||||
//o.clientsRwLocker.Lock()
|
o.clientsRwLocker.Lock()
|
||||||
//defer o.clientsRwLocker.Unlock()
|
defer o.clientsRwLocker.Unlock()
|
||||||
var msg = WsSessionInfo{
|
var msg = WsSessionInfo{
|
||||||
Type: msgType,
|
Type: msgType,
|
||||||
Content: message,
|
Content: message,
|
||||||
|
@ -99,7 +99,7 @@ func (cr ChatCache) GetChatRecord(sessionId string) (data []*accountFiee.ChatRec
|
|||||||
//log.Print("获取聊天记录失败", zap.Error(err))
|
//log.Print("获取聊天记录失败", zap.Error(err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Printf("cache data: %+v", string(messages))
|
//fmt.Printf("cache data: %+v", string(messages))
|
||||||
if len(messages) > 0 {
|
if len(messages) > 0 {
|
||||||
_ = json.Unmarshal(messages, &data)
|
_ = json.Unmarshal(messages, &data)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user