fix(GODT-2326): Only run sync after addIMAPUser()

There is concurrency bug due to competing sync calls that can occur when
we clear the sync status in the Vault. Running sync at the end of
addIMAPUser() avoids the problem.

This patch also remove the execution of a sync task for
`user.ClearSyncStatus()`
This commit is contained in:
Leander Beernaert
2023-02-02 11:19:32 +01:00
parent a955dcbaa9
commit 0c8d4e8dd8
2 changed files with 6 additions and 7 deletions

View File

@ -172,6 +172,7 @@ func (bridge *Bridge) addIMAPUser(ctx context.Context, user *user.User) error {
}
}
user.TriggerSync()
return nil
}