Skip to content

Commit 65ca872

Browse files
committed
refactor: 过滤掉超时异常
1 parent e654d66 commit 65ca872

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/BootstrapBlazor/Services/WebClientService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ public async Task<ClientInfo> GetClientInfo()
4646
// 等待 SetData 方法执行完毕
4747
try
4848
{
49-
await _taskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(1));
49+
await _taskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(3));
5050
}
51+
catch (TimeoutException) { }
5152
catch (Exception ex)
5253
{
5354
logger.LogError(ex, "method GetClientInfo failed");

0 commit comments

Comments
 (0)