测试发信

pull/23/head
taoshihan1991 4 years ago
parent 799c042ddf
commit 842c391086

@ -91,10 +91,10 @@ func OneKefuMessage(toId string, str []byte) {
mKefuConns, ok := KefuList[toId]
if mKefuConns != nil && ok {
for _, kefu := range mKefuConns {
//log.Println("OneKefuMessage lock")
//kefu.Mux.Lock()
//defer kefu.Mux.Unlock()
//log.Println("OneKefuMessage unlock")
log.Println("OneKefuMessage lock")
kefu.Mux.Lock()
defer kefu.Mux.Unlock()
log.Println("OneKefuMessage unlock")
error := kefu.Conn.WriteMessage(websocket.TextMessage, str)
tools.Logger().Println("send_kefu_message", error, str)
}

Loading…
Cancel
Save