mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 01:06:21 +01:00
Fix connection error not handled in Photos
This commit is contained in:
parent
afa32c4299
commit
054d6bbae5
1 changed files with 9 additions and 1 deletions
|
@ -208,7 +208,15 @@ class ScanAccountDirBloc
|
||||||
}
|
}
|
||||||
|
|
||||||
stopwatch.reset();
|
stopwatch.reset();
|
||||||
final hasUpdate = await _syncOnline(ev);
|
final bool hasUpdate;
|
||||||
|
try {
|
||||||
|
hasUpdate = await _syncOnline(ev);
|
||||||
|
} catch (e, stackTrace) {
|
||||||
|
_log.shout("[_onEventQuery] Exception while request", e, stackTrace);
|
||||||
|
emit(ScanAccountDirBlocFailure(
|
||||||
|
cacheFiles.where((f) => file_util.isSupportedFormat(f)).toList(), e));
|
||||||
|
return;
|
||||||
|
}
|
||||||
_log.info(
|
_log.info(
|
||||||
"[_onEventQuery] Elapsed time (_syncOnline): ${stopwatch.elapsedMilliseconds}ms, hasUpdate: $hasUpdate");
|
"[_onEventQuery] Elapsed time (_syncOnline): ${stopwatch.elapsedMilliseconds}ms, hasUpdate: $hasUpdate");
|
||||||
if (hasUpdate) {
|
if (hasUpdate) {
|
||||||
|
|
Loading…
Reference in a new issue