diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-31 11:24:47 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-31 11:24:47 +0200 |
commit | 8394985e142021844a1358f1d0f585c884a573f0 (patch) | |
tree | da832fac803c2359b8d62ccaaf0f518f8d3d1f3a /apps | |
parent | 52f51c94dbdbd38475f72d49a978512ade07e660 (diff) | |
parent | 3dc5c59e5721b4e363acca28dbf0bf2c9e4856ac (diff) | |
download | nextcloud-server-8394985e142021844a1358f1d0f585c884a573f0.tar.gz nextcloud-server-8394985e142021844a1358f1d0f585c884a573f0.zip |
Merge pull request #23672 from owncloud/use-retry-wrapper-for-sftp
Use RetryWrapper for SFTP storage
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/sftp.php | 4 |
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) { } |