1
This commit is contained in:
parent
8471c502a4
commit
bd7a68482d
@ -44,11 +44,12 @@ func (this *player) SendMsg(rspMsg proto.Message) {
|
||||
GetWspListener().SendProxyMsg(this.socket.Conn, this.socket.SocketHandle, rspMsg)
|
||||
}
|
||||
|
||||
func (this *player) reBind(socket f5.WspCliConn) {
|
||||
func (this *player) reBind(socket f5.WspCliConn, sessionId string) {
|
||||
if this.socket.IsValid() {
|
||||
delete(_playerMgr.socketHash, this.socket)
|
||||
}
|
||||
this.socket = socket
|
||||
this.sessionId = sessionId
|
||||
_playerMgr.socketHash[this.socket] = this
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ func (this *playerMgr) CMLogin(hdr *f5.MsgHdr, msg *cs.CMLogin) {
|
||||
rspMsg.Errcode = proto.Int32(0)
|
||||
rspMsg.Errmsg = proto.String("")
|
||||
rspMsg.ServerInfo = proto.String(mt.Table.IMCluster.GetServerInfo())
|
||||
oldHum.reBind(hdr.GetSocket())
|
||||
oldHum.reBind(hdr.GetSocket(), msg.GetSessionId())
|
||||
oldHum.SendMsg(&rspMsg)
|
||||
return
|
||||
}
|
||||
@ -95,7 +95,7 @@ func (this *playerMgr) CMLogin(hdr *f5.MsgHdr, msg *cs.CMLogin) {
|
||||
rspMsg.Errcode = proto.Int32(0)
|
||||
rspMsg.Errmsg = proto.String("")
|
||||
rspMsg.ServerInfo = proto.String(mt.Table.IMCluster.GetServerInfo())
|
||||
oldHum.reBind(hdr.GetSocket())
|
||||
oldHum.reBind(hdr.GetSocket(), msg.GetSessionId())
|
||||
oldHum.SendMsg(&rspMsg)
|
||||
return
|
||||
}
|
||||
@ -270,7 +270,7 @@ func (this *playerMgr) CMReconnect(hdr *f5.MsgHdr, msg *cs.CMReconnect) {
|
||||
"session_id no valid"))
|
||||
return
|
||||
}
|
||||
hum.reBind(hdr.GetSocket())
|
||||
hum.reBind(hdr.GetSocket(), msg.GetSessionId())
|
||||
hum.SendMsg(rspMsg)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user