mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
fix(GODT-2614): Handle failed update during sync
The sync process was getting stuck since we never handled the case where the update to Gluon failed. This caused the flush stage to exist, but the sync process would continue until it eventually gets stuck due to lack of progress.
This commit is contained in:
@ -610,6 +610,10 @@ func (user *User) syncMessages(
|
||||
}, logging.Labels{"sync-stage": "flush"})
|
||||
|
||||
for flushUpdate := range flushUpdateCh {
|
||||
if flushUpdate.err != nil {
|
||||
return flushUpdate.err
|
||||
}
|
||||
|
||||
if err := vault.SetLastMessageID(flushUpdate.messageID); err != nil {
|
||||
return fmt.Errorf("failed to set last synced message ID: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user