添加了-debug启动项,此启动项将禁用服务器的心跳检测功能

This commit is contained in:
milimoe 2023-11-19 02:59:18 +08:00 committed by GitHub
parent 713a4142a2
commit 9818fecc37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -130,8 +130,11 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
private void StartSendingHeartBeat()
{
_SendingHeartBeat = true;
SendingHeartBeatTask = Task.Factory.StartNew(SendHeartBeat);
if (!FunGameInfo.FunGame_DebugMode)
{
_SendingHeartBeat = true;
SendingHeartBeatTask = Task.Factory.StartNew(SendHeartBeat);
}
}
private void StopReceiving()

View File

@ -13,6 +13,12 @@
public const string FunGame_CopyRight = @"©2023 Milimoe. 米粒的糖果屋";
/// <summary>
/// 添加-debug启动项将开启DebugMode仅适用于Desktop或Console
/// <para>目前支持禁用心跳检测功能</para>
/// </summary>
public static bool FunGame_DebugMode { get; set; } = false;
private const string FunGame_Core = "FunGame Core";
private const string FunGame_Core_Api = "FunGame Core Api";
private const string FunGame_Console = "FunGame Console";