Update MediaService.php
This commit is contained in:
@@ -258,8 +258,10 @@ class MediaService {
|
||||
$headerArgs .= ' --header=' . escapeshellarg($h);
|
||||
}
|
||||
}
|
||||
// --tries=5: reintenta automáticamente ante Connection reset by peer (problema con lookaside.fbsbx.com)
|
||||
$cmd = 'wget --tries=5 --prefer-family=IPv4 -O ' . escapeshellarg($tmpFile) . $headerArgs . ' ' . escapeshellarg($url) . ' 2>&1';
|
||||
// --continue: reanuda desde donde se cortó (evita reiniciar ante Connection reset by peer)
|
||||
// --tries=10 --waitretry=3: reintenta hasta 10 veces esperando 3s entre intentos
|
||||
// --prefer-family=IPv4: evitar problemas IPv6
|
||||
$cmd = 'wget --continue --tries=10 --waitretry=3 --prefer-family=IPv4 -O ' . escapeshellarg($tmpFile) . $headerArgs . ' ' . escapeshellarg($url) . ' 2>&1';
|
||||
try {
|
||||
exec($cmd, $output, $exitCode);
|
||||
} catch (\Error $e) {
|
||||
|
||||
Reference in New Issue
Block a user