fix
This commit is contained in:
parent
ac07b86971
commit
528af06922
|
@ -246,14 +246,14 @@ func (l *DataTransferLogic) setConnPool(conn *websocket.Conn, userInfo *auth.Use
|
||||||
}*/
|
}*/
|
||||||
//保存连接
|
//保存连接
|
||||||
mapConnPool.Store(uniqueId, ws)
|
mapConnPool.Store(uniqueId, ws)
|
||||||
|
//累加统计连接数
|
||||||
|
increaseWebsocketConnectCount(userInfo.UserId, userInfo.GuestId)
|
||||||
//非白板用户,需要为这个用户建立map索引便于通过用户查询
|
//非白板用户,需要为这个用户建立map索引便于通过用户查询
|
||||||
createUserConnPoolElement(userInfo.UserId, userInfo.GuestId, uniqueId)
|
createUserConnPoolElement(userInfo.UserId, userInfo.GuestId, uniqueId)
|
||||||
if isFirefoxBrowser {
|
if isFirefoxBrowser {
|
||||||
time.Sleep(time.Second * 1) //兼容下火狐(直接发回去收不到第一条消息:有待研究)
|
time.Sleep(time.Second * 1) //兼容下火狐(直接发回去收不到第一条消息:有待研究)
|
||||||
}
|
}
|
||||||
ws.sendToOutChan(ws.respondDataFormat(constants.WEBSOCKET_CONNECT_SUCCESS, websocket_data.ConnectSuccessMsg{Wid: uniqueId}))
|
ws.sendToOutChan(ws.respondDataFormat(constants.WEBSOCKET_CONNECT_SUCCESS, websocket_data.ConnectSuccessMsg{Wid: uniqueId}))
|
||||||
//发送累加统计连接数
|
|
||||||
increaseWebsocketConnectCount(userInfo.UserId, userInfo.GuestId)
|
|
||||||
return ws, nil
|
return ws, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user