From 51a3533bf3c43d8d31c9f170309bc6cdbaa62f45 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 2 Jun 2021 16:05:55 +0200 Subject: [PATCH] FtpServer: added usleep It solves the problem when ftps upload fails. I have no idea why this happens, but this helped. (vitalita.cz) --- src/Deployment/FtpServer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Deployment/FtpServer.php b/src/Deployment/FtpServer.php index 47661b6..0eca3d1 100644 --- a/src/Deployment/FtpServer.php +++ b/src/Deployment/FtpServer.php @@ -111,6 +111,7 @@ public function writeFile(string $local, string $remote, callable $progress = nu : Safe::ftp_nb_continue($this->connection); $blocks++; + usleep(10000); } while ($ret === FTP_MOREDATA); if ($this->filePermissions) {