Skip to content

Commit

Permalink
feat: Ctrl + C 现在能够正常退出节点
Browse files Browse the repository at this point in the history
  • Loading branch information
SALTWOOD committed Apr 3, 2024
1 parent d966f83 commit 65ac116
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CSharp-OpenBMCLAPI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ protected override int Run(string[] args)
Cluster cluster = new(info, token);
SharedData.Logger.LogSystem($"成功创建 Cluster 实例");
AppDomain.CurrentDomain.ProcessExit += (sender, e) => Utils.ExitCluster(cluster).Wait();
Console.CancelKeyPress += (sender, e) => Utils.ExitCluster(cluster).Wait();

cluster.Start();
cluster.WaitForStop();
Expand Down

0 comments on commit 65ac116

Please sign in to comment.