Fix app hanging if runAllSyncTasks() throws an error

Co-authored-by: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-03-06 16:27:01 -06:00
committed by GitHub
parent 41ffa1c526
commit fb2fce6502

View File

@@ -1183,7 +1183,11 @@ export async function startApp(): Promise<void> {
);
} finally {
setupAppState();
drop(start());
drop(
start().catch(error => {
log.error('start: threw an unexpected error', error);
})
);
initializeNetworkObserver(
window.reduxActions.network,
() => window.getSocketStatus().authenticated.status
@@ -1456,7 +1460,14 @@ export async function startApp(): Promise<void> {
}
log.info('Expiration start timestamp cleanup: complete');
await runAllSyncTasks();
try {
await runAllSyncTasks();
} catch (error) {
log.error(
'runAllSyncTasks: threw an unexpected error during startup, continuing without processing remaining syncTasks',
error
);
}
cancelInitializationMessage();