结构修改
This commit is contained in:
parent
50954b4518
commit
1e1a479ab4
|
@ -297,7 +297,7 @@ func (r *AiRouterBiz) handleKnowle(channel chan entitys.Response, c *websocket.C
|
||||||
}
|
}
|
||||||
|
|
||||||
// 通过session 找到知识库session
|
// 通过session 找到知识库session
|
||||||
session := c.Headers("X-Session", "")
|
session := c.Query("x-session", "")
|
||||||
if len(session) == 0 {
|
if len(session) == 0 {
|
||||||
return errors.SessionNotFound
|
return errors.SessionNotFound
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ func (h *ChatService) Chat(c *websocket.Conn) {
|
||||||
|
|
||||||
//简单协议:bind:<uid>
|
//简单协议:bind:<uid>
|
||||||
if c.Headers("Sec-Websocket-Protocol") == "bind" && req.SessionID != "" {
|
if c.Headers("Sec-Websocket-Protocol") == "bind" && req.SessionID != "" {
|
||||||
uid := c.Headers("X-Session")
|
uid := c.Query("x-session")
|
||||||
_ = h.Gw.BindUid(clientID, req.SessionID)
|
_ = h.Gw.BindUid(clientID, req.SessionID)
|
||||||
log.Printf("bind %s -> uid:%s\n", clientID, uid)
|
log.Printf("bind %s -> uid:%s\n", clientID, uid)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue