sync: backgroud sync: allow failed sync

master
Nicolò Balzarotti 2019-12-30 07:12:54 +01:00
parent 05fcc7b553
commit 4adcee3eea
No known key found for this signature in database
GPG Key ID: E5900B8AC02DE455
1 changed files with 6 additions and 1 deletions

View File

@ -26,7 +26,12 @@ function background_sync(s::MatrixSync)
global sync_enabled, hooks
sync_enabled = true
@async while sync_enabled
res = sync!(s)
res = try
sync!(s)
catch e
@warn "Error $e during sync!"
continue
end
if :sync in keys(hooks)
try
hooks[:sync](res)