From 046eb0c635cbfe3ceb21da8f13a2159ec12264e1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 4 Dec 2017 16:34:53 +0100 Subject: add retry wrapper when reading files from swift Signed-off-by: Robin Appelman --- lib/private/Files/ObjectStore/Swift.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/private/Files/ObjectStore/Swift.php') diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php index 2ee3a2d62d3..ecfbe136e4c 100644 --- a/lib/private/Files/ObjectStore/Swift.php +++ b/lib/private/Files/ObjectStore/Swift.php @@ -26,6 +26,7 @@ namespace OC\Files\ObjectStore; use Guzzle\Http\Exception\ClientErrorResponseException; +use Icewind\Streams\RetryWrapper; use OCP\Files\ObjectStore\IObjectStore; use OCP\Files\StorageAuthException; use OCP\Files\StorageNotAvailableException; @@ -264,7 +265,7 @@ class Swift implements IObjectStore { // save the object content in the context of the stream to prevent it being gc'd until the stream is closed stream_context_set_option($stream, 'swift', 'content', $objectContent); - return $stream; + RetryWrapper::wrap($stream); } /** -- cgit v1.2.3