Skip to content

Commit

Permalink
fix(mobile): long waiting time for login request when server is unrea…
Browse files Browse the repository at this point in the history
…chable (immich-app#12100)

* fix(mobile): long waiting time for login request when server is unreachable

* lint

* increase timeout duration
  • Loading branch information
alextran1502 authored Aug 29, 2024
1 parent 74f18a4 commit 9bfaa52
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mobile/lib/providers/authentication.provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ class AuthenticationNotifier extends StateNotifier<AuthenticationState> {
UserPreferencesResponseDto? userPreferences;
try {
final responses = await Future.wait([
_apiService.usersApi.getMyUser(),
_apiService.usersApi.getMyPreferences(),
_apiService.usersApi.getMyUser().timeout(const Duration(seconds: 7)),
_apiService.usersApi
.getMyPreferences()
.timeout(const Duration(seconds: 7)),
]);
userResponse = responses[0] as UserAdminResponseDto;
userPreferences = responses[1] as UserPreferencesResponseDto;
Expand Down

0 comments on commit 9bfaa52

Please sign in to comment.