This commit is contained in:
laodaming 2023-09-04 11:21:24 +08:00
parent ae80cf12f3
commit 1a1903c826

View File

@ -63,6 +63,13 @@ func (r *reuseConnProcessor) allocationMessage(w *wsConnectItem, data []byte) {
logx.Info("开始重新绑定websocket连接标识")
w.uniqueId = wid
mapConnPool.Store(wid, *w)
//添加用户id级别索引
createUserConnPoolElement(userConnPoolChanItem{
userId: w.userId,
guestId: w.guestId,
uniqueId: wid,
option: 1,
})
rsp := w.respondDataFormat(constants.WEBSOCKET_CONNECT_SUCCESS, wid)
w.sendToOutChan(rsp)
logx.Info("重新绑定websocket连接标识成功")