Skip to content

Commit 5870fb0

Browse files
committed
refactor(DiscoveryCenter): 使用全局常量替换硬编码的服务类型
将 ServerType.DiscoveryCenter 替换为 GlobalConst.DiscoveryCenterName 以提高代码可维护性,避免硬编码
1 parent a9dd44e commit 5870fb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GameFrameX.Launcher/StartUp/Discovery/AppStartUpDiscoveryCenter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace GameFrameX.Launcher.StartUp.Discovery;
4242
/// <summary>
4343
/// 服务发现中心服务器
4444
/// </summary>
45-
[StartUpTag(ServerType.DiscoveryCenter)]
45+
[StartUpTag(GlobalConst.DiscoveryCenterName)]
4646
internal partial class AppStartUpDiscoveryCenter : AppStartUpBase
4747
{
4848
public override async Task StartAsync()
@@ -238,7 +238,7 @@ protected override void Init()
238238
Setting = new AppSetting
239239
{
240240
ServerId = 21000,
241-
ServerType = ServerType.DiscoveryCenter,
241+
ServerType = GlobalConst.DiscoveryCenterName,
242242
InnerPort = 21001,
243243
HttpPort = 21011,
244244
MetricsPort = 21090,

0 commit comments

Comments
 (0)