diff --git a/GameFrameX.StartUp/AppStartUpBase.cs b/GameFrameX.StartUp/AppStartUpBase.cs index 8c743a42..f43f167e 100644 --- a/GameFrameX.StartUp/AppStartUpBase.cs +++ b/GameFrameX.StartUp/AppStartUpBase.cs @@ -68,7 +68,7 @@ public bool Init(ServerType serverType, AppSetting setting, string[] args = null Init(); Setting.CheckNotNull(nameof(Setting)); GlobalSettings.ServerId = Setting.ServerId; - + GlobalSettings.IsDebug = Setting.IsDebug; return true; } diff --git a/GameFrameX.StartUp/AppStartUpByServer.cs b/GameFrameX.StartUp/AppStartUpByServer.cs index 142c6405..7afc311d 100644 --- a/GameFrameX.StartUp/AppStartUpByServer.cs +++ b/GameFrameX.StartUp/AppStartUpByServer.cs @@ -2,6 +2,7 @@ using GameFrameX.Log; using GameFrameX.NetWork.Abstractions; using GameFrameX.NetWork.Message; +using GameFrameX.Setting; using GameFrameX.StartUp.Abstractions; using GameFrameX.SuperSocket.Connection; using GameFrameX.SuperSocket.Primitives; @@ -66,6 +67,9 @@ public abstract partial class AppStartUpBase : IAppStartUp { MessageEncoderHandler.SetCompressionHandler(messageCompressHandler); } + + GlobalSettings.LaunchTime = DateTime.Now; + GlobalSettings.IsAppRunning = true; } /// @@ -73,6 +77,7 @@ public abstract partial class AppStartUpBase : IAppStartUp /// protected void StopServer() { + GlobalSettings.IsAppRunning = false; StopTcpServer(); StopWebSocketServer(); }