Skip to content

Commit 0bcb3f0

Browse files
committed
[修改]1. 修改服务器状态配置
1 parent cafa3f9 commit 0bcb3f0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

GameFrameX.StartUp/AppStartUpBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public bool Init(ServerType serverType, AppSetting setting, string[] args = null
6868
Init();
6969
Setting.CheckNotNull(nameof(Setting));
7070
GlobalSettings.ServerId = Setting.ServerId;
71-
71+
GlobalSettings.IsDebug = Setting.IsDebug;
7272
return true;
7373
}
7474

GameFrameX.StartUp/AppStartUpByServer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using GameFrameX.Log;
33
using GameFrameX.NetWork.Abstractions;
44
using GameFrameX.NetWork.Message;
5+
using GameFrameX.Setting;
56
using GameFrameX.StartUp.Abstractions;
67
using GameFrameX.SuperSocket.Connection;
78
using GameFrameX.SuperSocket.Primitives;
@@ -66,13 +67,17 @@ public abstract partial class AppStartUpBase : IAppStartUp
6667
{
6768
MessageEncoderHandler.SetCompressionHandler(messageCompressHandler);
6869
}
70+
71+
GlobalSettings.LaunchTime = DateTime.Now;
72+
GlobalSettings.IsAppRunning = true;
6973
}
7074

7175
/// <summary>
7276
/// 停止服务器
7377
/// </summary>
7478
protected void StopServer()
7579
{
80+
GlobalSettings.IsAppRunning = false;
7681
StopTcpServer();
7782
StopWebSocketServer();
7883
}

0 commit comments

Comments
 (0)