summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-12-06 08:28:20 +0100
committerGitHub <noreply@github.com>2017-12-06 08:28:20 +0100
commitcde58610b4a05a5dc8778d847917040a33583c38 (patch)
tree9b71650a115c6701469a7fabb9d104ff908299ef /apps/files_external
parent9505c564476051ec358a428fc8eb22263634b4fc (diff)
parent046eb0c635cbfe3ceb21da8f13a2159ec12264e1 (diff)
downloadnextcloud-server-cde58610b4a05a5dc8778d847917040a33583c38.tar.gz
nextcloud-server-cde58610b4a05a5dc8778d847917040a33583c38.zip
Merge pull request #7387 from nextcloud/swift-retry
add retry wrapper when reading files from swift
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Lib/Storage/Swift.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php
index 970ade02cea..f07087e903d 100644
--- a/apps/files_external/lib/Lib/Storage/Swift.php
+++ b/apps/files_external/lib/Lib/Storage/Swift.php
@@ -43,6 +43,7 @@ use Guzzle\Http\Url;
use Guzzle\Http\Exception\ClientErrorResponseException;
use Icewind\Streams\CallbackWrapper;
use Icewind\Streams\IteratorDirectory;
+use Icewind\Streams\RetryWrapper;
use OpenCloud;
use OpenCloud\Common\Exceptions;
use OpenCloud\OpenStack;
@@ -389,7 +390,7 @@ class Swift extends \OC\Files\Storage\Common {
stream_context_set_option($stream, 'swift','content', $streamInterface);
if(!strrpos($streamInterface
->getMetaData('wrapper_data')[0], '404 Not Found')) {
- return $stream;
+ return RetryWrapper::wrap($stream);
}
return false;
} catch (\Guzzle\Http\Exception\BadResponseException $e) {