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;
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) {
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;
// 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);
}
/**