Skip to content

Commit be80b46

Browse files
committed
Release 1.9.8-3
fix: 证书转换的输出覆盖了进度条
1 parent 6d5ae22 commit be80b46

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CSharp-OpenBMCLAPI/Modules/Cluster.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class Cluster : RunnableBase
3535
protected IStorage storage;
3636
protected AccessCounter counter;
3737
public CancellationTokenSource cancellationSrc = new CancellationTokenSource();
38+
public WebApplication? application = null;
3839
//List<Task> tasks = new List<Task>();
3940

4041
public Cluster(ClusterInfo info, TokenManager token) : base()
@@ -91,11 +92,10 @@ protected async Task<int> AsyncRun()
9192
await GetConfiguration();
9293
// 检查文件
9394
await CheckFiles();
94-
95+
SharedData.Logger.LogInfo();
9596
Connect();
9697

9798
await RequestCertification();
98-
//t.Start();
9999

100100
InitializeService();
101101

@@ -130,16 +130,16 @@ private void InitializeService()
130130
listenOptions.UseHttps(cert);
131131
});
132132
});
133-
var app = builder.Build();
133+
application = builder.Build();
134134
var path = $"{SharedData.Config.clusterFileDirectory}cache";
135-
app.UseStaticFiles();
136-
app.MapGet("/download/{hash}", async (context) =>
135+
application.UseStaticFiles();
136+
application.MapGet("/download/{hash}", async (context) =>
137137
{
138138
FileAccessInfo fai = await HttpServerUtils.DownloadHash(context, this.storage);
139139
this.counter.Add(fai);
140140
});
141-
app.MapGet("/measure/{size}", (context) => HttpServerUtils.Measure(context));
142-
Task task = app.RunAsync();
141+
application.MapGet("/measure/{size}", (context) => HttpServerUtils.Measure(context));
142+
Task task = application.RunAsync();
143143
Utils.tasks.Add(Task.Run(async () =>
144144
{
145145
Thread.Sleep(1000);

CSharp-OpenBMCLAPI/Modules/Utils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public static async Task ExitCluster(Cluster cluster)
4949
await cluster.KeepAlive();
5050
Thread.Sleep(1000);
5151
await cluster.Disable();
52+
await cluster.application.ThrowIfNull().StopAsync();
5253
cluster.Stop();
5354
}
5455

0 commit comments

Comments
 (0)