```
refactor(common/cool/coolconfig): 修改RPC配置字段类型 将RPC字段从uint16类型更改为string类型的Address字段, 以支持更灵活的地址配置。同时更新了配置初始化逻辑, 从server.rpc改为server.address作为配置键。 ```
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"blazing/logic/service/player"
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Broadcast struct {
|
||||
@@ -41,9 +42,17 @@ func (s *Server) QuitSelf(a int) error {
|
||||
s.quit = true
|
||||
if a != 0 {
|
||||
player.Mainplayer.Range(func(key uint32, value *player.Player) bool {
|
||||
value.Kick()
|
||||
value.Kick(1)
|
||||
return true
|
||||
})
|
||||
} else {
|
||||
go func() {
|
||||
<-time.After(10 * time.Minute)
|
||||
player.Mainplayer.Range(func(key uint32, value *player.Player) bool {
|
||||
value.Kick(1)
|
||||
return true
|
||||
})
|
||||
}()
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user