still remove the federated share even if we cant notify the remote

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-07-17 14:19:44 +02:00
parent 515d83236b
commit e49b8959c4
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
1 changed files with 7 additions and 2 deletions

View File

@ -366,8 +366,13 @@ class Manager {
$result = $getShare->execute(array($hash, $this->uid));
if ($result) {
$share = $getShare->fetch();
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline');
try {
$share = $getShare->fetch();
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline');
} catch (\Exception $e) {
// if we fail to notify the remote (probably cause the remote is down)
// we still want the share to be gone to prevent undeletable remotes
}
}
$getShare->closeCursor();