diff options
Diffstat (limited to 'apps/federation')
-rw-r--r-- | apps/federation/command/syncfederationaddressbooks.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/federation/command/syncfederationaddressbooks.php b/apps/federation/command/syncfederationaddressbooks.php index d7761d14814..9fb1e51f643 100644 --- a/apps/federation/command/syncfederationaddressbooks.php +++ b/apps/federation/command/syncfederationaddressbooks.php @@ -63,9 +63,13 @@ class SyncFederationAddressBooks extends Command { $targetBookProperties = [ '{DAV:}displayname' => $url ]; - $newToken = $this->syncService->syncRemoteAddressBook($url, 'system', $sharedSecret, $syncToken, $targetPrincipal, $targetBookId, $targetBookProperties); - if ($newToken !== $syncToken) { - $this->dbHandler->setServerStatus($url, TrustedServers::STATUS_OK, $newToken); + try { + $newToken = $this->syncService->syncRemoteAddressBook($url, 'system', $sharedSecret, $syncToken, $targetPrincipal, $targetBookId, $targetBookProperties); + if ($newToken !== $syncToken) { + $this->dbHandler->setServerStatus($url, TrustedServers::STATUS_OK, $newToken); + } + } catch (\Exception $ex) { + $output->writeln("Error while syncing $url : " . $ex->getMessage()); } } $progress->finish(); |