fix
This commit is contained in:
parent
3fdf14c493
commit
0015ef7540
|
@ -15,7 +15,7 @@ type reuseConnProcessor struct {
|
||||||
|
|
||||||
// 处理分发到这里的数据
|
// 处理分发到这里的数据
|
||||||
func (r *reuseConnProcessor) allocationMessage(w *wsConnectItem, data []byte) {
|
func (r *reuseConnProcessor) allocationMessage(w *wsConnectItem, data []byte) {
|
||||||
logx.Info("收到请求恢复上次连接标识数据:", string(data))
|
//logx.Info("收到请求恢复上次连接标识数据:", string(data))
|
||||||
var wid string
|
var wid string
|
||||||
if err := json.Unmarshal(data, &wid); err != nil {
|
if err := json.Unmarshal(data, &wid); err != nil {
|
||||||
logx.Error(" invalid format of wid :", wid)
|
logx.Error(" invalid format of wid :", wid)
|
||||||
|
@ -60,7 +60,7 @@ func (r *reuseConnProcessor) allocationMessage(w *wsConnectItem, data []byte) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//重新绑定
|
//重新绑定
|
||||||
logx.Info("开始重新绑定websocket连接标识")
|
//logx.Info("开始重新绑定websocket连接标识")
|
||||||
oldUniqueId := w.uniqueId
|
oldUniqueId := w.uniqueId
|
||||||
w.uniqueId = wid
|
w.uniqueId = wid
|
||||||
mapConnPool.Store(wid, *w)
|
mapConnPool.Store(wid, *w)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user