胶料快检添加离线模式
This commit is contained in:
@@ -62,10 +62,10 @@ public class NetworkMonitor : INetworkMonitor
|
||||
|
||||
private async Task MonitorLoopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
// 启动后立即探活一次,避免首屏 10 秒内 IsOnline 恒为 false
|
||||
// 启动后立即探活一次,避免首屏数秒内 IsOnline 恒为 false
|
||||
await RunHttpProbeAndRecomputeAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
using var timer = new PeriodicTimer(TimeSpan.FromSeconds(10));
|
||||
using var timer = new PeriodicTimer(TimeSpan.FromSeconds(5));
|
||||
while (await timer.WaitForNextTickAsync(cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
await RunHttpProbeAndRecomputeAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user