mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 16:02:26 +08:00
系统架构层面流量控制功能完善
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
_ "net/http/pprof"
|
||||
"os"
|
||||
"os/signal"
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
@@ -49,6 +50,7 @@ func Run(ctx context.Context, configFile string) error {
|
||||
_, err := client.Discovery.KeepaliveServer(context.TODO(), &api.KeepaliveServerReq{
|
||||
ServerType: api.GS,
|
||||
AppId: APPID,
|
||||
LoadCount: uint32(atomic.LoadInt32(&game.ONLINE_PLAYER_NUM)),
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("keepalive error: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user