diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index f6b2873cf49a460c6c774e7238c90eb4a74842b7..c44ee9f908e0a7a5a098b58fd19c21f79f7a697a 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) {
 		}