消息服务优化
This commit is contained in:
parent
5768776e56
commit
d123fc93d5
@ -326,6 +326,10 @@ func (m *MessageMgr) Handle(msg *msg.Msg) (interface{}, error) {
|
||||
|
||||
// 异步处理消息 (多线程版本)
|
||||
func (m *MessageMgr) MessageHandleAsync(message *msg.Msg) error {
|
||||
if message.End != 0 && message.End < GoUtil.Now() {
|
||||
log.Debug("message had expired type:%d,to:%d", message.Type, message.To)
|
||||
return nil
|
||||
}
|
||||
if fun, ok := m.handler[message.HandleType]; ok {
|
||||
// 应用中间件
|
||||
handlerWithMiddleware := m.applyMiddlewares(fun)
|
||||
|
||||
@ -1024,6 +1024,7 @@ func (p *Player) HandleInChampshipRank() {
|
||||
H: ChampshipMod.GetH(),
|
||||
N: ChampshipMod.GetN(),
|
||||
},
|
||||
End: GoUtil.ZeroTimestamp() + 86400, // 第二天零点删除
|
||||
HandleType: MsgMod.HANDLE_MDO_CHAMPSHIP_INRANK,
|
||||
}
|
||||
SendMsgToCenterAsync(m)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user