summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-03-30 22:45:09 +0200
committerLukas Reschke <lukas@owncloud.com>2016-03-30 23:01:42 +0200
commit1f7b037a59af77b3aa88ddfdd9c05f29944796d5 (patch)
tree0b85118c6b7329e3e80d0d4e6eafc1d409a27575 /apps/files_external
parent456035a750602d6f47384c170e25063684774043 (diff)
downloadnextcloud-server-1f7b037a59af77b3aa88ddfdd9c05f29944796d5.tar.gz
nextcloud-server-1f7b037a59af77b3aa88ddfdd9c05f29944796d5.zip
Use RetryWrapper for SFTP storage
Equivalent to https://github.com/owncloud/core/pull/23442 Required for making encryption work with external storage reliable.
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/sftp.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index f6b2873cf49..c44ee9f908e 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -32,6 +32,7 @@
namespace OC\Files\Storage;
use Icewind\Streams\IteratorDirectory;
+use Icewind\Streams\RetryWrapper;
use phpseclib\Net\SFTP\Stream;
/**
@@ -374,7 +375,8 @@ class SFTP extends \OC\Files\Storage\Common {
case 'c':
case 'c+':
$context = stream_context_create(array('sftp' => array('session' => $this->getConnection())));
- return fopen($this->constructUrl($path), $mode, false, $context);
+ $handle = fopen($this->constructUrl($path), $mode, false, $context);
+ return RetryWrapper::wrap($handle);
}
} catch (\Exception $e) {
}