Skip to content

Commit

Permalink
[修改]1. 修改服务器状态配置
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Dec 3, 2024
1 parent cafa3f9 commit 0bcb3f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GameFrameX.StartUp/AppStartUpBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 5 additions & 0 deletions GameFrameX.StartUp/AppStartUpByServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,13 +67,17 @@ public abstract partial class AppStartUpBase : IAppStartUp
{
MessageEncoderHandler.SetCompressionHandler(messageCompressHandler);
}

GlobalSettings.LaunchTime = DateTime.Now;
GlobalSettings.IsAppRunning = true;
}

/// <summary>
/// 停止服务器
/// </summary>
protected void StopServer()
{
GlobalSettings.IsAppRunning = false;
StopTcpServer();
StopWebSocketServer();
}
Expand Down

0 comments on commit 0bcb3f0

Please sign in to comment.