diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpext.php b/src/wp-admin/includes/class-wp-filesystem-ftpext.php
index 1dfe136..f337c73 100644
|
a
|
b
|
class WP_Filesystem_FTPext extends WP_Filesystem_Base { |
| 180 | 180 | |
| 181 | 181 | fseek( $temp, 0 ); // Skip back to the start of the file being written to |
| 182 | 182 | |
| 183 | | $tries = 1; |
| 184 | | $total_tries = 3; |
| 185 | | while (($ret = ftp_fput($this->link, $file, $temp, $type)) != 1 && $tries <= $total_tries) |
| 186 | | { |
| 187 | | if($tries < $total_tries) |
| 188 | | { |
| 189 | | error_log("Error Uploading File. Tried $tries of $total_tries. Reconnecting..."); |
| 190 | | sleep(1); |
| 191 | | $this->connect(); |
| 192 | | } |
| 193 | | else |
| 194 | | error_log("Error Uploading File. Tried $tries of $total_tries."); |
| 195 | | |
| 196 | | $tries++; |
| 197 | | } |
| | 183 | $ret = @ftp_fput( $this->link, $file, $temp, FTP_BINARY ); |
| 198 | 184 | |
| 199 | 185 | fclose($temp); |
| 200 | 186 | unlink($tempfile); |