refactor: 将端口和在线ID类型从uint16改为uint32
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-02 18:34:20 +08:00
committed by cnb
parent ae06d18aa2
commit 47bc680889
12 changed files with 35 additions and 35 deletions

View File

@@ -66,7 +66,7 @@ func Start() {
}
port, err := determinePort(cool.Config.ServerInfo.CanPort)
cool.Config.ServerInfo.Port = uint16(port)
cool.Config.ServerInfo.Port = uint32(port)
if err != nil {
log.Fatalf("Failed to determine port: %v", err)
}
@@ -75,12 +75,12 @@ func Start() {
socket.WithPort(port),
)
rpcClient := rpc.StartClient(serverID, uint16(port), server) //连接rpc
rpcClient := rpc.StartClient(serverID, uint32(port), server) //连接rpc
controller.Maincontroller.RPCClient = rpcClient //将RPC赋值Start
controller.Maincontroller.Port = uint16(port) //赋值服务器ID
controller.Maincontroller.Port = uint32(port) //赋值服务器ID
controller.Init(true)
xmlres.Initfile()
server.Boot(serverID, gconv.Uint16(port))
server.Boot(serverID, gconv.Uint32(port))
}