Skip to content

Commit a18a74d

Browse files
Increase HTTP Timeout
1 parent cd28c75 commit a18a74d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Src/HackerNews/ViewModels/Base/BaseViewModel.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ namespace HackerNews
1414
abstract class BaseViewModel : INotifyPropertyChanged
1515
{
1616
static readonly JsonSerializer _serializer = new();
17-
static readonly HttpClient _client = new();
17+
static readonly HttpClient _client = new()
18+
{
19+
Timeout = TimeSpan.FromMinutes(1)
20+
};
1821

1922
readonly AsyncAwaitBestPractices.WeakEventManager _propertyChangedEventManager = new();
2023

21-
static int _networkIndicatorCount;
24+
static volatile int _networkIndicatorCount;
2225

2326
event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged
2427
{

0 commit comments

Comments
 (0)