优化接口,避免造成节点意外下线
This commit is contained in:
parent
2e78f2e076
commit
3ebdff13c4
@ -53,6 +53,11 @@ func HandleAdminReq(args []interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func HandleClientReq(args []interface{}) {
|
func HandleClientReq(args []interface{}) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
log.Error("HandleClientReq panic: %v", r)
|
||||||
|
}
|
||||||
|
}()
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
if G_GameLogicPtr.SeverInfo.Status == SERVER_STATUS_CLOSE || G_GameLogicPtr.SeverInfo.Status == SERVER_STATUS_MAINTAIN {
|
if G_GameLogicPtr.SeverInfo.Status == SERVER_STATUS_CLOSE || G_GameLogicPtr.SeverInfo.Status == SERVER_STATUS_MAINTAIN {
|
||||||
return // 服务器关闭或者维护中,不处理任何消息
|
return // 服务器关闭或者维护中,不处理任何消息
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user