summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-12-08 09:26:41 +0100
committerGitHub <noreply@github.com>2017-12-08 09:26:41 +0100
commitac29608db6816312b7d558fc3ac8b86ad34ad282 (patch)
tree26fe35b2cb5f436ca94f211707cf04c679acc3e1 /apps
parentc9318ddd1b32afaff4f339bc656938444a891009 (diff)
parent0519ca589381b2473fa23a135efb185f29c71649 (diff)
downloadnextcloud-server-ac29608db6816312b7d558fc3ac8b86ad34ad282.tar.gz
nextcloud-server-ac29608db6816312b7d558fc3ac8b86ad34ad282.zip
Merge pull request #7409 from nextcloud/swift-retry-12
[12]add retry wrapper when reading files from swift
Diffstat (limited to 'apps')
-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 d32d6b3a19c..ff6b1e6271b 100644
--- a/apps/files_external/lib/Lib/Storage/Swift.php
+++ b/apps/files_external/lib/Lib/Storage/Swift.php
@@ -39,6 +39,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;
@@ -385,7 +386,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) {